How to read the predicted label of a Neural Netowork with Cross Entropy Loss? Pytorch
If you're dealing with classification problem, then model.predict is supposed to give you logits.
outputs = net(images)
_, predicted = torch.max(outputs, 1)

for i in range(num_input):
    print(classes[predicted[i]])

if you have only one input then the predicted class would be as following:
classes[predicted[0]]
In your case:
prediction = F.softmax(prediction)
print(prediction)
output = model(input.unsqueeze(0))
_,pred = output.max(1)
print(pred)

# print class name
print(classes[pred[0]])  # &lt;- should be added