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 2020/08/28 01:16:50 UTC

[GitHub] [incubator-mxnet] szha commented on a change in pull request #19028: Add size check for numpy ctc loss

szha commented on a change in pull request #19028:
URL: https://github.com/apache/incubator-mxnet/pull/19028#discussion_r478778183



##########
File path: src/operator/nn/ctc_loss-inl.h
##########
@@ -238,6 +238,8 @@ inline bool CTCLossOpShape(const nnvm::NodeAttrs &attrs,
     CHECK_GE(dshape[0], lshape[1]) << "The max number of labels cannot exceed "
                                       "the maximum sequence length of the "
                                       "data.";
+    CHECK_LT(dshape.Size(), INT32_MAX) << "CTC Loss does not support large"

Review comment:
       ```suggestion
       CHECK_LT(dshape.Size(), INT32_MAX) << "ValueError: CTC Loss does not support large"
   ```




----------------------------------------------------------------
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:
users@infra.apache.org