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 = image_datasets['train'][0]
plt.imshow(x.permute(1, 2, 0).numpy())
print(y)
print(image_datasets['train'].class_to_index)

Note that the visualization might look distorted, if you’ve normalized the data, so you could either remove the normalization for the sake of debugging or “unnormalize” the data.