Sorry ptrblck, still having some problems understanding. The data loaded into the tensor thats returning the numbers 1-12 is image data taken from 12 folders of images of particular seedlings. So when I tried to subtract 1 from train_raw I get an error that you can’t subtract an int from an image.
So the program is actually creating the 1-12 numbers itself, so I can I get it to create 0-11 instead.
Below is the code I used to load the data:
## Image loaders
## Dataset transforms puts the images in tensor form
normalise = transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
train_raw = dataset.ImageFolder(PATH+"train", transform=transforms.Compose([transforms.RandomResizedCrop(sz),
                                                                            transforms.RandomHorizontalFlip(),
                                                                            transforms.ToTensor(),
                                                                           normalise]))
train_loader = DataLoader(train_raw, batch_size=batch_size, shuffle=True, num_workers=4)

valid_raw = dataset.ImageFolder(PATH+"valid", transform=transforms.Compose([transforms.CenterCrop(sz),
                                                                            transforms.ToTensor(),
                                                                           normalise]))
valid_loader = DataLoader(valid_raw, batch_size=batch_size, shuffle=False, num_workers=4)