Solved by tom in post #2 
              
              
                Hello Patrick, 
you mean the Embedding layer? 
If you have one-hot encoded words, you can use torch.nn.functional.linear (which is matrix multiplication, what happens in  a a Linear layer without bias) to get the same result, here with 
e = torch.nn.Embedding(2, 5)

idx = torch.tensor([[0, 1]]) # ba…