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/23 22:07:03 UTC

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

zheng-da 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_r212472034
 
 

 ##########
 File path: src/operator/tensor/control_flow_op.h
 ##########
 @@ -188,7 +188,7 @@ inline bool WhereOpShape(const nnvm::NodeAttrs& attrs,
     SHAPE_ASSIGN_CHECK(*in_attrs, 0, tshape);
     return true;
   } else if ((*in_attrs)[0].ndim() == 1) {
-    return (*in_attrs)[0].Size() == static_cast<size_t>(tshape[0]);
+    CHECK_EQ((*in_attrs)[0].Size(), static_cast<size_t>(tshape[0]));
 
 Review comment:
   this is wrong. what is the problem of the original code? If the first dimension doesn't match, infer shape fails, so it should return false.

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