How output of nn.embedding() calculated?

I know it is just a lookup table . But how are the Dense vector outputs calculated?

Isn’t your question for nn.EmbeddingBag?