Solved by KFrank in post #2 
              
              
                Hi Hongnan! 

Possibly relevant to your issue: 
As of version 1.10, CrossEntropyLoss supports probabilistic targets (in 
addition to integer-class-label targets).  One-hot-encoded targets can be 
understood as a special case of probabilistic targets.  Earlier versions did 
not support probabilistic …