Hi @bing,
sorry for not answering. If you look at the documentation for CrossEntropyLoss 8, it says

This criterion expects a class index in the range [0,C−1] as the target for each value of a 1D tensor of size minibatch.

Greetings.