You explain very clearly! The last question: is the nn.Embedding do the same thing like nn.Linear? But nn.Linear should input a vector representation (e.g, using one-hot) so it can build a look-up table. The nn.Embedding do the same thing but simplified it just using word-index. Let me know if I misunderstand any part. Also, is there any document can be refered? I have searched for a long while!