Skip to content

Commit 72ef2d3

Browse files
committed
in tf, two branches of cond can have different shapes
1 parent 8b2f4b7 commit 72ef2d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tf2onnx/rewriter/cond_rewriter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def _get_output_shape_dtype(self, cond_context):
127127
false_dtype
128128
)
129129
)
130-
output_shapes.append(utils.merge_shapes(true_shape, false_shape))
130+
output_shapes.append(utils.create_vague_shape_like(utils.merge_shapes(true_shape, false_shape)))
131131
output_dtypes.append(true_dtype)
132132
return output_shapes, output_dtypes
133133

0 commit comments

Comments
 (0)