You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/08/17 17:14:13 UTC

[GitHub] haojin2 commented on a change in pull request #12035: Pad Operator Type Support

haojin2 commented on a change in pull request #12035: Pad Operator Type Support
URL: https://github.com/apache/incubator-mxnet/pull/12035#discussion_r210975424
 
 

 ##########
 File path: tests/python/unittest/test_operator.py
 ##########
 @@ -2905,37 +2905,46 @@ def test_roipooling():
                            numeric_eps=1e-4, rtol=1e-1, atol=1E-4)
 
 
-def check_pad_with_shape(shape, xpu, pad_width, mode):
+def check_pad_with_shape(shape, xpu, pad_width, mode, dtype="float64"):
     # bind with label
-    X = mx.symbol.Variable('X')
+    real_types = ["float16", "float32", "float64"]
+    X = mx.symbol.Variable('X', dtype=dtype)
     Y = mx.symbol.Pad(data=X, mode=mode, pad_width=pad_width)
-    x = mx.random.uniform(-1, 1, shape, ctx=mx.cpu()).copyto(xpu)
+    if dtype in real_types:
 
 Review comment:
   I think you do not really need this if-else branch at this moment as the caller of this function only passes real types.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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