Solved by KFrank in post #3 
              
              
                Hi S.! 

The short answer is that you have to write your own cross-entropy 
function to do what you want – see below. 
There are two things going on here: 
First, as Aman noted, the input to CrossEntropyLoss (your 
softmax_out1) should be raw-score logits that range from -inf to 
+inf, rather than p…