Skip to content

Commit be287e6

Browse files
committed
Turn on graph tf optimize grappler dependency
Signed-off-by: Deyu Huang <[email protected]>
1 parent 76924df commit be287e6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tf2onnx/tf_loader.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ def tf_optimize_grappler(input_names, output_names, graph_def):
684684
# depends on so for now don't turn this on, constfold is always enabled now.
685685
rewrite_options.optimizers[:] = [
686686
# 'pruning', 'constfold', 'arithmetic', 'dependency', 'function',
687-
'constfold', 'function'
687+
'constfold', 'function', 'dependency'
688688
]
689689

690690
if Version(tf.__version__) >= Version("2.5"):
@@ -771,8 +771,8 @@ def toposort(data):
771771
try:
772772
func = function_def_to_graph(fdef, input_shapes=input_shapes)
773773
except: # pylint: disable=bare-except
774-
# if there is a missmatch between caller and function use the functions shape
775-
logger.warning("shape missmatch between caller and function: %s", k)
774+
# if there is a mismatch between caller and function use the functions shape
775+
logger.warning("shape mismatch between caller and function: %s", k)
776776
func = function_def_to_graph(fdef)
777777
_FUNCTIONS[k] = func
778778
_, _, _, _, _, tfunctions = tflist_to_onnx(func, {})

0 commit comments

Comments
 (0)