Solved by Mona_Jalal in post #2 
              
              
                Thanks a lot to @ptrblck for helping with most parts of the following code and guidance: 
import torchvision.datasets as datasets
class MonaDataset(datasets.folder.ImageFolder):
    def __init__(self, root, transform=None, target_transform=None,
                 loader=datasets.folder.default_loader…