Solved by ptrblck in post #2 
              
              
                The error points to a type mismatch for the nn.Embedding module, which expects a LongTensor as the input, while you are apparently using a FloatTensor, so you would need to change the dtype of the input. 
A quick solution would be to transform it via x = x.long(). 
Also note, that Variables are depr…