Solved by KFrank in post #2 
              
              
                Hi Hiep! 

The short answer is that nn.functional.cross_entropy 
one-hots your class labels for you. 
The number-one rule is that the output of your network means 
whatever you train it to mean. 
More directly to your question: 
You are using nn.functional.cross_entropy as your loss 
function.  Your…