Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Commit

Permalink
Add warning when tensorflow > 2.3 is detected
Browse files Browse the repository at this point in the history
  • Loading branch information
TomWildenhain-Microsoft committed Sep 9, 2021
1 parent 3b6da29 commit 26e0f46
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion keras2onnx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,18 @@
except ImportError:
raise AssertionError('Please conda install / pip install tensorflow or tensorflow-gpu before the model conversion.')

from .proto import save_model
from .proto import save_model, is_tensorflow_later_than
from .common import Variable, cvtfunc, set_logger_level
from .common.utils import k2o_logger
from .funcbook import set_converter, set_converters

if is_tensorflow_later_than("2.3"):
start_red = "\033[91m"
end_color = "\033[00m"
k2o_logger().error(
start_red + "\n**** Tensorflow version > 2.3 is not supported. "
"Please see https://github.com/onnx/keras-onnx/issues/737 ****\n" + end_color)

from .main import convert_keras
from .main import export_tf_frozen_graph
from .main import build_io_names_tf2onnx
Expand Down

0 comments on commit 26e0f46

Please sign in to comment.