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 2019/02/10 20:24:53 UTC

[GitHub] szha commented on a change in pull request #14107: fix nd.slice for following outputs: (1) begin=end and (2) end=-1, step=-1

szha commented on a change in pull request #14107: fix nd.slice for following outputs: (1) begin=end and (2) end=-1, step=-1
URL: https://github.com/apache/incubator-mxnet/pull/14107#discussion_r255353867
 
 

 ##########
 File path: src/operator/tensor/matrix_op-inl.h
 ##########
 @@ -653,6 +653,7 @@ inline void GetIndexRange(const TShape& dshape,
   }
 
   for (index_t i = 0; i < param_begin.ndim(); ++i) {
+    CHECK_NE(dshape[i], 0) << "Invalid input shape!";
 
 Review comment:
   0 means the dimension hasn't been successfully inferred yet which doesn't necessarily mean the shape is invalid. 

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