Hi,
I’m using the custom dataset class proposed but I ran into the problems when applying transform to the converted numpy array.
The transform I’m trying to apply is:
transforms.Compose([
transforms.ToPILImage(),
transforms.Resize((224, 224)),
transforms.ToTensor(),
transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])
])
the error I get is “RuntimeError: output with shape [1, 224, 224] doesn’t match the broadcast shape [3, 224, 224]”
Would you give me some advice of how my transform should be in order to apply it to the converted numpy array?