nn.CrossEntropyLoss expects logits, as internally F.log_softmax and nn.NLLLoss will be used.
If you want to get the predicted class, you could simply use torch.argmax:
output = model(input)
pred = torch.argmax(output, dim=1)

I assume dim1 is representing the classes. If not, you should change the dim argument.