Hello,
This is because indexing in PyTorch is zero based. You simply have to map the predicted indices (0, 1, 2) to your classes (1, 2, 3). If you think about it, the classes you want to predict could be cat, dog and fish and torch.argmax(output, dim=1) would still give you numbers 0, 1, 2.
Let me know if it is not clear!