Cuda error `THCNumerics<AccT>::gt(sum, accZero)`

I wrote a seq2seq model which requires sampling during training.
I guess this error might be related to the sampling procedure but I’m not sure what this error message suggests about the multinomial distribution.
/opt/conda/conda-bld/pytorch_1565272271120/work/aten/src/THC/THCTensorRandom.cuh:179: void sampleMultinomialOnce(long *, long, int, T *, T *, int, int) [with T = float, AccT = float]: block: [68,0,0], thread: [0,0,0] Assertion `THCNumerics<AccT>::gt(sum, accZero)` failed.

Is any familar with this kind of error?

This means that the categories you sample from all have probability mass 0.

Best regards


1 Like