Skip to content

Commit

Permalink
Fix MergeOptimizer for the case Transpose + xxx + Transpose (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiafatom authored Aug 27, 2020
1 parent b3e0631 commit 991ae8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion onnxconverter_common/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ def apply(self, node_list):
node_list = self.delete_node_1ton(node_list, self.begin, self.begin_n, self.begin_n.successor[0])
node_list = self.delete_node_1ton(node_list, self.end_p.get_precedence_by_idx(0), self.end_p, self.end)
else:
node_list = self.delete_node_1ton(node_list, self.begin_n, self.end_p, self.end)
node_list = self.delete_node_1ton(node_list, self.end_p.get_precedence_by_idx(0), self.end_p, self.end)
self.begin_n.origin = helper.make_node('Transpose', self.begin_n.origin.input, self.begin_n.origin.output,
self.begin_n.origin.name, perm=perm_f)
return node_list, True
Expand Down

0 comments on commit 991ae8a

Please sign in to comment.