nn.Embedding and one-hot nn.Linear produce different results

Yes, you are right. It is not a fair comparison. Yet, I do not understand how can one produce good results, while the other does not. There should not be a significant difference between them.