That’s what I was doing wrong – thanks! AveryLiu’s response to this stackoverflow post 2.2k has a good example of how to use nn.Embedding properly, to make sure you’re initializing it with the right arguments.