Solved by ptrblck in post #2 
              
              
                The DataLoader does not interpret or create the targets, but creates batches of samples using the Dataset. 
ImageFolder, which you have used as the dataset, will sort the folders and assign a class label to each folder. 
You could check some samples by trying to visualize a few random indices: 
x, y…