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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to