emb = nn.Embedding(10, 3)
print(emb.weight.shape)
print(emb.weight)
input = torch.LongTensor([[1,2,4,5],[4,3,2,9]])
print('input:', input.shape)
embo = emb(input)
print(embo.shape)
print('embo:',embo)

Here is a demo code that works but I don’t understand what is 10.
Since our input is torch.Size([2, 4]), output is torch.Size([2, 4, 3]) because of the embedding emb.weight.shape[1] is 3.
Can someone explain me in simple words what is the meaning of 10 = emb.weight.shape[1]?
My current assumption one additional hidden layer will be created of 10x10, but I am not sure.