Ahtsham_Manzoor:

RuntimeError: index out of range: Tried to access index 50297 out of table with 50296 rows. at /pytorch/aten/src/TH/generic/THTensorEvenMoreMath.cpp:237


I see that there are 2 things confusing here.


In your debug prints, the embedding seems to have 50297 rows. But error message says it has 50296 rows?


Accessing index 50297 will not be possible even in the embedding with size 50297 x D. You can access only from  0 to 50296. Can you check along these lines?