jwfromm commented on a change in pull request #4639: [Relay/Topi][Op] Conv1D
URL: https://github.com/apache/incubator-tvm/pull/4639#discussion_r365377388
##########
File path: tests/python/frontend/onnx/test_forward.py
##########
@@ -1732,22 +1732,34 @@ def test_or():
verify_or(indata=[x, y], dtype=bool)
-def verify_conv(x_shape, w_shape, y_shape, p):
- node = helper.make_node('Conv',
- inputs=['x', 'W'],
- outputs=['y'],
- kernel_shape=[3, 3],
- # Default values for other attributes:
- # strides=[1, 1],
- # dilations=[1, 1],
- # groups=1
- pads=p,)
+def verify_conv(x_shape, w_shape, y_shape, padding, kernel_shape, strides,
dilations, auto_pad="NOTSET"):
+ if padding is None:
+ node = helper.make_node('Conv',
+ inputs=['x', 'W'],
+ outputs=['y'],
+ kernel_shape=kernel_shape,
+ # Default values for other attributes:
+ strides=strides,
+ dilations=dilations,
+ # groups=1
+ auto_pad=auto_pad)
+ else:
+ node = helper.make_node('Conv',
+ inputs=['x', 'W'],
+ outputs=['y'],
+ kernel_shape=kernel_shape,
+ # Default values for other attributes:
+ strides=strides,
+ dilations=dilations,
+ # groups=1
+ pads=padding)
Review comment:
Onnx is very picky about these arguments. If the auto_pad attribute is used,
the pads attribute must not be provided at all. Note that auto_pad and pads are
two separate attributes.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services