Skip to content

Commit f5a7db4

Browse files
reload tf graph when shape is updated
1 parent 1000b66 commit f5a7db4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tf2onnx/shape_inference.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ def infer_shape_for_graph(tf_graph):
9292
updated = infer_shape_for_op(o)
9393
if updated:
9494
shape_updated = True
95-
tf_graph = reload_tf_graph(tf_graph)
95+
if shape_updated:
96+
tf_graph = reload_tf_graph(tf_graph)
9697
return tf_graph
9798

9899

0 commit comments

Comments
 (0)