Convert word token ids into word vectors using nn.embedding

Hello,

I am very new to pytorch. I want to convert word token ids into word vectors using nn.embedding object. How can I achieve that?

Any suggestion would be very helpful.