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

Commit 15cf991

Browse files
Add warning when tensorflow > 2.3 is detected
Signed-off-by: Tom Wildenhain <[email protected]>
1 parent 3b6da29 commit 15cf991

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

keras2onnx/__init__.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,18 @@
2424
except ImportError:
2525
raise AssertionError('Please conda install / pip install tensorflow or tensorflow-gpu before the model conversion.')
2626

27-
from .proto import save_model
27+
from .proto import save_model, is_tensorflow_later_than
2828
from .common import Variable, cvtfunc, set_logger_level
29+
from .common.utils import k2o_logger
2930
from .funcbook import set_converter, set_converters
3031

32+
if is_tensorflow_later_than("2.3"):
33+
start_red = "\033[91m"
34+
end_color = "\033[00m"
35+
k2o_logger().error(
36+
start_red + "\n**** Tensorflow version > 2.3 is not supported. "
37+
"Please see https://github.com/onnx/keras-onnx/issues/737 ****\n" + end_color)
38+
3139
from .main import convert_keras
3240
from .main import export_tf_frozen_graph
3341
from .main import build_io_names_tf2onnx

0 commit comments

Comments
 (0)