Git-oNmE:

def getitem(self, item): image, label = self.imgs[item] image = Image.open(image) img = transform(image) return img, label


It seems that one of the images have only 2 channels. can you print the name and size of each image in this method and check which image causes the problem?