Tried adding to CustomDataset:
def  getitem (self, idx):
if (self.transform):
img = Image.open(filelist[idx])
x = transforms.RandomRotation(180)(img)
x = torchvision.transforms.Normalize(mean = self.mean, std = self.std)
x = torchvision.transforms.ToTensor()(img).view(-1)
x = x.view(-1, 1, 69, 69)
y = self.labels[idx]
return x, y
but got:
RuntimeError: Expected 4-dimensional input for 4-dimensional weight [32, 1, 5, 5], but got 5-dimensional input of size [10000, 1, 1, 69, 69] instead