optima2005 commented on a change in pull request #4511: [CONV] Asymmetric 
padding
URL: https://github.com/apache/incubator-tvm/pull/4511#discussion_r357900352
 
 

 ##########
 File path: topi/tests/python/test_topi_conv2d_nchw.py
 ##########
 @@ -176,6 +184,20 @@ def test_conv2d_nchw():
     verify_conv2d_nchw(1,  512,   5, 126, 3, 1, 1)
     verify_conv2d_nchw(1,  256,   3, 126, 3, 1, 1)
 
+    # Asymmetric padding
+    verify_conv2d_nchw(1,   3, 224,  64, 7, 2, (0, 0, 1, 1))
+    verify_conv2d_nchw(1,  64,  56,  64, 3, 1, (3, 3, 2, 2))
+    verify_conv2d_nchw(1,  64,  56,  64, 1, 1, (1, 2, 2, 1))
+    verify_conv2d_nchw(1,  64,  56,  64, 1, 1, (1, 2))
+    verify_conv2d_nchw(1,  64,  56,  64, 3, 1, (3, 1))
+    verify_conv2d_nchw(1,  64,  56,  64, 3, 1, (0, 2))
+    verify_conv2d_nchw(1,  64,  56,  64, 3, 1, (1, 2), use_cudnn=True)
+    verify_conv2d_nchw(1,  64,  56,  64, 1, 1, "VALID")
+    verify_conv2d_nchw(1,  64,  56,  64, 3, 1, "VALID")
+    verify_conv2d_nchw(1,  64,  56,  64, 3, 1, "VALID", use_cudnn=True)
+    # Currnt not working
+    #verify_conv2d_nchw(1,  64,  56,  64, 1, 1, "SAME")
 
 Review comment:
   The problem is due to that Tensor is passed in as kernel. But this utility 
function is not suppose to get involved with not python simple data type.  
Maybe certain places this function shouldn't be used  to get padding tuples. 
But currently I am not very clear about which should and which not.

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


With regards,
Apache Git Services

Reply via email to