Solved by joekid in post #13 
              
              
                Dear @KFrank you hit the nail, thank you. Thank you. 
The target is a single image HxW, each pixel labeled as belonging to [0…nClasses-1] 
loss = CrossEntropyLoss(input, target)  in the specified  size computes correctly (I was too wrong). 
Can you suggest me some place to learn the keys of DL, I a…