Why there is no label setting in the Transfer learning tutorial?

data_dir = 'data/hymenoptera_data'
image_datasets = {x: datasets.ImageFolder(os.path.join(data_dir, x),
                                          data_transforms[x])
                  for x in ['train', 'val']}
dataloaders = {x: torch.utils.data.DataLoader(image_datasets[x], batch_size=4,
                                             shuffle=True, num_workers=4)
              for x in ['train', 'val']}

In this code, why the author didn’t set a label to the image, but it can still work and extract the corresponding label?
Thx.

I don’t fully understand the question since ImageFolder is creating the labels based on the image folder structure. The DataLoaders will thus return the image tensors and their corresponding targets.