I ll explain the way I could fix the problem:

I run my code on the cpu, and I found that there is an error on my embedding layer, which is


RuntimeError: index out of range at /opt/conda/condabld/pytorch_1532576128691/work/aten/src/TH/generic/THTensorMath.cpp:352


I fix that issue and I don’t receive this error anymore


RuntimeError: CuDNN error: CUDNN_STATUS_INTERNAL_ERROR

The strange thing is that why on gpu my code does not stop on my embedding layer?