Solved by KFrank in post #2 
              
              
                Hi Szandala! 
The short story is that – for separate reasons – you are passing an 
improper input and target to your CrossEntropyLoss criterion 
function. 

This is appropriate.  You have a batch size of 1, with 9 predictions 
for a nine-class classification problem. 

This isn’t actually true. 
You…