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 2022/04/19 17:41:57 UTC

[GitHub] [tvm] AndrewZhaoLuo commented on a diff in pull request #11034: [Frontend][ONNX]support Pool2D layout is CHW

AndrewZhaoLuo commented on code in PR #11034:
URL: https://github.com/apache/tvm/pull/11034#discussion_r853331557


##########
python/tvm/relay/frontend/onnx.py:
##########
@@ -410,8 +410,16 @@ class Pool(OnnxOpConverter):
 
     @classmethod
     def _impl_v1(cls, inputs, attr, params):
+        data = inputs[0]
+        input_shape = infer_shape(data)
+        ndim = len(input_shape)
+
         attr_cvt, data = cls._run_calculation(inputs, attr, params)
-        return attr_cvt([data], attr, params)
+        out = attr_cvt([data], attr, params)
+
+        if ndim == 3 and len(attr["kernel_shape"]) == 2:

Review Comment:
   Can you make this so if kernel_shape rank and ndim differ by 1 we assume it's missing a batch dimension and runs below code? (same thing for _run_calculation



-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org