You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/03/16 21:12:34 UTC

[GitHub] [incubator-tvm] masahi commented on a change in pull request #5075: [Torch] Add initial 3D op support and test on Resnet 3D

masahi commented on a change in pull request #5075: [Torch] Add initial 3D op support and test on Resnet 3D
URL: https://github.com/apache/incubator-tvm/pull/5075#discussion_r393313322
 
 

 ##########
 File path: python/tvm/relay/frontend/pytorch.py
 ##########
 @@ -183,9 +183,27 @@ def _impl(inputs, input_types):
         data = inputs[0]
         output_size = _infer_shape(inputs[1])
 
+        # returns dummy indices too
         return _op.nn.adaptive_max_pool2d(
             data,
-            output_size=output_size)
+            output_size=output_size), None
+    return _impl
+
+def _adaptive_max_3d():
+    def _impl(inputs, input_types):
+        data = inputs[0]
+        output_size = _infer_shape(inputs[1])
+        # returns dummy indices too
+        return _op.nn.adaptive_max_pool3d(data, output_size=output_size), None
 
 Review comment:
   That is for python layer, after jitting torchscript `aten::adaptive_max_pool3d` (and 2d) op always returns 2 results. If `return_indices` is False, I think the second tensor is empty.
   
   See 
   https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/native/AdaptiveMaxPooling3d.cpp#L421

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services