Skip to content

Commit 1f3b9f2

Browse files
committed
Fix pylint errors
1 parent 09c4d44 commit 1f3b9f2

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tf2onnx/onnx_opset/nn.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,13 @@ def _convert_since_9(cls, ctx, node, op_type, use_target_size=False):
695695
final_target_size = build_dynamic_target_size(ctx, input_nchw, node.inputs[1])
696696
roi = ctx.make_const(utils.make_name("roi"), np.array([]).astype(np.float32))
697697
const_empty_float = ctx.make_const(utils.make_name("const_empty_float"), np.array([], dtype=np.float32))
698-
upsample = ctx.make_node("Resize", [input_nchw.output[0], roi.output[0], const_empty_float.output[0], final_target_size.output[0]],
698+
resize_inputs = [
699+
input_nchw.output[0],
700+
roi.output[0],
701+
const_empty_float.output[0],
702+
final_target_size.output[0]
703+
]
704+
upsample = ctx.make_node("Resize", resize_inputs,
699705
attr={"mode": mode, "nearest_mode": "floor",
700706
"coordinate_transformation_mode": "asymmetric"})
701707
else:
@@ -707,7 +713,8 @@ def _convert_since_9(cls, ctx, node, op_type, use_target_size=False):
707713
n, h, w, c = shape
708714
nh, nw = target_shape
709715
# scales is nchw
710-
# the reason not storing data at raw field is because of the bug: https://github.com/onnx/onnx/issues/1852
716+
# the reason not storing data at raw field is because of the bug:
717+
# https://github.com/onnx/onnx/issues/1852
711718
scale_val = np.array([1.0, 1.0, float(nh) / h, float(nw) / w]).astype(np.float32)
712719
scales = ctx.make_const(utils.make_name("scales"), scale_val, raw=False)
713720
else:

0 commit comments

Comments
 (0)