Hi, I’m new to PyTorch and not a very experienced Python-programmer.
I’m trying to create my first image classification project from scratch and I have now encountered I problem. I have 3 classes as you can see in my Jupiter notebook file directory but for some reason they get indexed as 1,2,3 instead of 0,1,2 when I print the labels. As far as I understand this might be the reason why I get IndexError later because nn.CrossEntropyLoss expects values starting from 0 and not 1. The image below shows my Jupyter notebook and the beginning of the code:
Any suggestions? Is my file structure somehow incorrect or how I can change the indexing?