trans = transforms.Compose([transforms.Resize(256),
                            transforms.TenCrop(224), # this is a list of PIL Images
                            transforms.Lambda(lambda crops: torch.stack([transforms.ToTensor()(crop) for crop in crops])),
                            transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
                           ])
test_trans = transforms.Compose([transforms.Resize(256),
                            transforms.CenterCrop(224),
                            #transforms.Lambda(lambda crops: torch.stack([ToTensor()(crop) for crop in crops])),
                            transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
                           ])
train = datasets.ImageFolder('/data/dog_images/train', transform = trans)
test = datasets.ImageFolder('/data/dog_images/test', transform = test_trans)
valid = datasets.ImageFolder('/data/dog_images/valid', transform = test_trans)

trainloader = torch.utils.data.DataLoader(train, shuffle = True, batch_size = 16, drop_last = True)
testloader = torch.utils.data.DataLoader(test, shuffle = False, batch_size = 16, drop_last = True)
validloader = torch.utils.data.DataLoader(valid, shuffle = False, batch_size = 16, drop_last = True)

loaders_scratch = {'train': trainloader,
                  'valid': validloader,
                  'test': testloader}

Please help with a way around the transforms.Normalize as it is returning error