So far I got this error for two reasons:

In case of classification, my labels where not in [0...(label_size-1)]

My input sequence contained indexes there where not in the embedding layer.

Since you don’t say what you’re doing or show any code, one can only guess. Does it work on CPU? And if not, what’s the error there?