class MyImageFolder(datasets.ImageFolder):
def getitem(self, index):
return super(MyImageFolder, self).getitem(index), self.imgs[index]#return image path
This works but I was just hoping to edit the Imagefolder files