Multiclass problem with cross entropy

How should I insert the labels to the loss?
should it be one-hot encoded?
or can it be tensor of class’s num:
tensor([1,2,5,3,5,3,…])

Hi,

Actually, you need to use indices as you have mentioned. No need to convert to one hot.
Here is the official doc.

Bests