Skip to content

Commit 3383ff9

Browse files
authored
Merge pull request #916 from jignparm/jignparm/fix_shape_warnings
Ignore shape inference warnings for FusedBatchNormV3:5
2 parents 9ec80aa + ff1da1c commit 3383ff9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tf2onnx/shape_inference.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,13 @@ def check_shape_for_tf_graph(tf_graph):
5151
Check whether TF graph misses any shape,
5252
and return all ops with None shape outputs for TF graph.
5353
"""
54+
skip_list = {'FusedBatchNormV3': 5}
5455
op_outputs_mapping_none_shape = defaultdict(list)
5556
for op in tf_graph.get_operations():
56-
for out in op.outputs:
57+
for i, out in enumerate(op.outputs):
58+
if op.type in skip_list:
59+
if skip_list[op.type] == i:
60+
continue
5761
if get_tf_tensor_shape(out) is None:
5862
op_outputs_mapping_none_shape[op.name].append(out.name)
5963
return op_outputs_mapping_none_shape

0 commit comments

Comments
 (0)