Skip to content

Commit d239316

Browse files
committed
Update back_to_back_optimizer.py
1 parent b204e26 commit d239316

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tf2onnx/optimizer/back_to_back_optimizer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,8 @@ def _optimize_conv_batchnorm_fusion(g, node, consumer_nodes):
237237
node2_shape = g.get_shape(node2.output[0])
238238
node2_dtype = g.get_dtype(node2.output[0])
239239
g.remove_node(node2.name)
240-
node.output = node2_output.copy()
240+
# the setter makes a copy
241+
node.output = node2_output
241242
g.set_shape(node2_output[0], node2_shape)
242243
g.set_dtype(node2_output[0], node2_dtype)
243244
return []

0 commit comments

Comments
 (0)