Solved by ptrblck in post #2 
              
              
                nn.CrossEntropyLoss should be a good fit in your case. 
You are not really encoding the labels in a hierarchical order as this would be the case using nn.MSELoss. 
Instead you provide the class indices, which will be used to get the current class probability. So there is mathematically no difference…