Solved by ptrblck in post #26 
              
              
                The nn.Embedding layer would get an input tensor, and you should check its min and max value, e.g. as: 
print(x.min(), x.max())
out = self.embedding(x) # raises the index error

This might give you the indices, which are out of bounds. However, the error description is a bit confusing, as you mentio…