Skip to content

Commit 085d6fa

Browse files
committed
remove lint alerts
1 parent 03e2bb7 commit 085d6fa

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tf2onnx/optimizer/transpose_optimizer.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -474,8 +474,7 @@ def _mul_handler(self, trans, node):
474474
result = np.multiply(transposed_val, mul_val)
475475
conv.inputs[1].set_tensor_value(np.transpose(result, (3, 2, 0, 1)))
476476

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()
479478
self._g.remove_node(node.name)
480479
return True
481480

@@ -522,8 +521,7 @@ def _sum_handler(self, trans, node):
522521
return False
523522

524523
# 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()
527525
new_input = [n.output[0] if n.is_const() else n.input[0] for n in inputs]
528526
self._g.replace_inputs(node, new_input)
529527
self._g.replace_input(trans, trans.input[0], node.output[0], 0)

0 commit comments

Comments
 (0)