I’m quite new to using Pytorch; the question is how to preprocess data for nn.Embedding correctly?

I see it takes only integers, but should these integers be like a sequence (0, 3, 4, 1, 2, 3, …) whose unique values start with 0, or any integer values are allowed (45, 98, 120, 45, …) as long as the number of unique values matches the input dimension?

The input should contain indices in the range `[0, num_embeddings-1]`

.