Matrix_op-inl.h:670: Check failed: b < len


#1

It looks like I’m hitting this condition: https://github.com/apache/incubator-mxnet/blob/master/src/operator/tensor/matrix_op-inl.h#L670

Should that ever happen or does that indicate a bug in mxnet? It’s happening consistently but I haven’t narrowed it down to a small test case.

It is a little suspicious that line 664 uses CHECK_GE but line 670 uses CHECK_LT and not CHECK_LE

Here’s the full error message: mxnet.base.MXNetError: [15:30:34] src/operator/tensor/./matrix_op-inl.h:670: Check failed: b < len (21 vs. 21) slicing with begin[0]=21 exceends limit of 21


#2

the use of CHECK_GE versus CHECK_LT seem consistent to me since we’re using zero indexing.

In what contexts are you getting this error message? It looks like you’re trying to perform a slice operation where your interval endpoint is bigger than your greatest index. Could you provide more info about the code you’re running?


#3

I get this error whenever I try to copy data from this matrix to cpu to use it (by calling asnumpy, or asscalar, or trying to print it). It’s the output of gluon.loss.SoftmaxCrossEntropyLoss for a batch of 99 vectors.