Solved by KFrank in post #2 
              
              
                Hello Peppermint! 

Actually, everything looks good here.  According to my calculator, 
24* 0.7963 = 19.1112.  (As an aside, 24 * 0.79 = 18.96.) 

Yes. 

CrossEntropyLoss computes a weighted average using your weights. 
In your example, you have 23 weights of value 1, and 1 weight of value 
55.  So …