This comment is wrong and might come from an older code snippet:
criterion = torch.nn.MSELoss()    # Softmax is internally computed.

For a multi-class classification, I would recommend to use nn.CrossEntropyLoss and pass the targets as class indices to the criterion.
You could create the class indices using target = torch.argmax(Y_target, 1).
Also, to calculate the accuracy, use the prediction with the highest logit:
prediction = torch.argmax(hypothesis, 1)