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/15 13:38:57 UTC

[GitHub] anirudh2290 commented on a change in pull request #12174: [MXNET-806] Report error when shape mismatch in "where" operator

anirudh2290 commented on a change in pull request #12174: [MXNET-806] Report error when shape mismatch in "where" operator
URL: https://github.com/apache/incubator-mxnet/pull/12174#discussion_r210270908
 
 

 ##########
 File path: tests/python/unittest/test_operator.py
 ##########
 @@ -4442,6 +4442,18 @@ def test_where_numeric_gradient(shape, same_shape):
             condition_np, x_np, y_np = get_forward_inputs_condition_vector(shape)
         check_numeric_gradient(where_sym, [condition_np, x_np, y_np], grad_nodes=['x', 'y'])
 
+    def test_invalid_shape():
+        condition = mx.sym.Variable('condition')
+        x = mx.sym.Variable('x')
+        y = mx.sym.Variable('y')
+        where_sym = mx.sym.where(condition, x, y)
 
 Review comment:
   can you add similar tests for mx.nd.where

----------------------------------------------------------------
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