pyjhzwh commented on a change in pull request #4984: Fix stride default value None in torch.nn.functional.avg_pool URL: https://github.com/apache/incubator-tvm/pull/4984#discussion_r387954278
########## File path: python/tvm/relay/frontend/pytorch.py ########## @@ -458,7 +458,10 @@ def _impl(inputs, input_types): data = inputs[0] pool_size = _infer_shape(inputs[1]) - strides = _infer_shape(inputs[2]) + if inputs[2]: + strides = _infer_shape(inputs[2]) + else: + strides = pool_size Review comment: https://github.com/pytorch/pytorch/blob/17a5c677963dc3ecb7ff505585ed15eadaaf74ef/torch/nn/functional.py#L269-L270 According to the description of strides above, for avg_pool2d. Stride's default value kernel_size, which should have the same size as pool_size here ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services