Skip to content

Commit 1da54e1

Browse files
authored
Merge pull request #643 from zhijxu-MS/fix_bug
_handle_node_having_branches only handle node which only has one output
2 parents ac71b6c + 522560a commit 1da54e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tf2onnx/optimizer/transpose_optimizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def _handle_node_having_branches(self, node):
197197
return False
198198
# make sure node's all input transpose all have only 1 consumer node,
199199
# otherwise, it would impact their other output nodes
200-
if self._nodes_has_single_consumer_node(node.inputs):
200+
if self._nodes_has_single_consumer_node(node.inputs) and len(node.output) == 1:
201201
self._create_transpose_pairs_after_node(node)
202202
input_transposes = set(node.inputs)
203203
for n in input_transposes:

0 commit comments

Comments
 (0)