What's the difference between nn.Embedding and nn.Linear

what’s the difference between nn.Embedding and nn.Linear ? Does embedding do the same thing as fc layer ?

2 Likes

There is an excellent answer here: python - What is the difference between an Embedding Layer with a bias immediately afterwards and a Linear Layer in PyTorch - Stack Overflow