Skip to content

Commit 93d2437

Browse files
Fix bug in conv rewriter if intermediate node outputs are used (#1498)
Signed-off-by: Tom Wildenhain <[email protected]>
1 parent 0bb2540 commit 93d2437

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tf2onnx/rewriter/conv2d_with_add_rewriter.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ def rewrite_biasadd_with_conv2d(g, ops):
3232
conv_output = biasadd.output
3333
conv_inputs = [conv_input[0], conv_input[1], biasadd.input[1]]
3434

35+
if len(g.find_output_consumers(conv.output[0])) > 1:
36+
continue
3537
# Remove the Conv and BiasAdd node
3638
g.remove_node(conv.name)
3739
g.remove_node(biasadd.name)

0 commit comments

Comments
 (0)