Skip to content

Commit

Permalink
Make merge optimizer faster (#1326)
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Wildenhain <tomwi@microsoft.com>
  • Loading branch information
TomWildenhain-Microsoft authored Feb 11, 2021
1 parent 5cfb2c9 commit c551408
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tf2onnx/optimizer/merge_duplicated_nodes_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def _merge_nodes_that_are_duplicated(self, nodes_to_process, graph):
if set(node_to_delete.output).intersection(set(graph.outputs)):
continue
for old_input, new_input in zip(node_to_delete.output, node_to_retain.output):
graph.replace_all_inputs(old_input, new_input, ops=graph.get_nodes())
graph.replace_all_inputs(old_input, new_input)
graph.remove_node(node_to_delete.name)
self._graph_can_be_optimized = True

Expand Down

0 comments on commit c551408

Please sign in to comment.