Skip to content

Commit f4e511b

Browse files
committed
#1070 Removed redundant check
1 parent bb7b8a8 commit f4e511b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tf2onnx/onnx_opset/nn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def conv_convert_inputs(ctx, node, with_kernel=False, new_kernel_shape=None,
117117
if with_kernel:
118118
# Some ONNX convolution ops require to reshape the kernel (ie. depthwise_conv2d).
119119
if new_kernel_shape:
120-
if len(node.inputs) >= 2 and node.inputs[1].is_const():
120+
if node.inputs[1].is_const():
121121
input_node = node.inputs[1]
122122
val = input_node.get_tensor_value(as_list=False)
123123
val = np.reshape(val, new_kernel_shape)

0 commit comments

Comments
 (0)