Skip to content

Commit ef29107

Browse files
authored
Merge pull request #528 from lucienwang1009/tf_infer_shape_reload
reload tf graph when shape is updated
2 parents 1000b66 + f5a7db4 commit ef29107

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)