tuple: (image, target) where target is index of the target class
image, target = self.data[index], self.targets[index]
print("++++++++++++++++++++", type(image), type(target))
if self.transform is not None:
image = self.transform({"image": image})["image"]
After Change
if self.transform is not None:
// fix for albumentations >= v0.5.0 - call `TensorToImage` directly
if len(image.shape) == 2:
image = image.unsqueeze(0)
image = tensor_to_ndimage(image, False, move_channels_dim=True)
image = self.transform({"image": image})["image"]