pesci85:

i wonder if i can specify the labels inside Dataloader () type label_mode = ‘coarse_label’ or coarse label = True since the above dataloader nn allows me to have two labels.


The DataLoader will just use the passed Dataset to create batches by loading each sample via the Dataset.__getitem__ method.
I don’t see, where your current script allows the DataLoader to return two labels.
Do you mean that your get_loaders method returns multiple values?



 pesci85:

assuming that the cifar10 train file contains a dictionary with data, labels, for the cifar 100 the train would contain data, labels and coarse_labels?


CIFAR10 uses lists to store the data and target as seen here 3.
If you want to add another label or manipulate the already loaded labels, I would recommend to write a custom Dataset and apply the modifications in the new __init__ method.