@@ -474,8 +474,7 @@ def _mul_handler(self, trans, node):
474
474
result = np .multiply (transposed_val , mul_val )
475
475
conv .inputs [1 ].set_tensor_value (np .transpose (result , (3 , 2 , 0 , 1 )))
476
476
477
- ops = self ._g .get_nodes ()
478
- self ._g .replace_all_inputs (None , node .output [0 ], trans .output [0 ]) # ops
477
+ self ._g .replace_all_inputs (None , node .output [0 ], trans .output [0 ]) # self._g.get_nodes()
479
478
self ._g .remove_node (node .name )
480
479
return True
481
480
@@ -522,8 +521,7 @@ def _sum_handler(self, trans, node):
522
521
return False
523
522
524
523
# switch to trans(sum(x1, x2, x3, ...))
525
- ops = self ._g .get_nodes ()
526
- self ._g .replace_all_inputs (None , node .output [0 ], trans .output [0 ]) # ops
524
+ self ._g .replace_all_inputs (None , node .output [0 ], trans .output [0 ]) # self._g.get_nodes()
527
525
new_input = [n .output [0 ] if n .is_const () else n .input [0 ] for n in inputs ]
528
526
self ._g .replace_inputs (node , new_input )
529
527
self ._g .replace_input (trans , trans .input [0 ], node .output [0 ], 0 )
0 commit comments