Hello,
I had a piece of code that was working fine but when I added a normalization step in my “transforms”, it crashed.
Here’s my code for creating the generator :
data_transforms_train = transforms.Compose([
    transforms.Resize((512, 512)),
    transforms.RandomVerticalFlip(),
    transforms.RandomHorizontalFlip(),
    transforms.ToTensor(),
    transforms.Normalize(mean=[0.8979], std=[0.3025])
])
    
params = {'batch_size': 1,
          'shuffle': True,
          'num_workers': 0}

training_set = Dataset(partition['train'], labels, transform=data_transforms_train)
training_generator = DataLoader(training_set, **params)

Again if I remove the line “transforms.Normalize(mean=[0.8979], std=[0.3025])”, everything goes back to working fine.
Any suggestion on what could be causing this ?
Thanks !