manupa-arm commented on a change in pull request #9682:
URL: https://github.com/apache/tvm/pull/9682#discussion_r766588850
##########
File path: tests/python/contrib/test_cmsisnn/test_pooling.py
##########
@@ -45,10 +45,9 @@
def make_model(pool_op, shape, pool_size, strides, padding, dtype, scale,
zero_point, relu_type):
"""Return a model and any parameters it may have"""
op = relay.var("input", shape=shape, dtype=dtype)
- pad_ = (0, 0, 0, 0)
- if padding == "SAME":
- dilation = (1, 1)
- pad_ = get_same_padding((shape[1], shape[2]), pool_size, dilation,
strides)
+ dilation = (1, 1)
+ pad_, result = get_padding((shape[1], shape[2]), pool_size, dilation,
strides, padding)
+ if result:
Review comment:
I have added a comment below, it is a bit difficult to follow what
"result" means here. I think a named tuple might help.
However, looking at this feel, it is better to keep the get_padding(..) just
to return the pad top, bottom, left, right values while here we could use
padding check create the nn.pad rather than passing it inside the get_padding
to return another boolean as 'result'
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]