There is clearly a torchvision.transforms.Resize documented here:
http://pytorch.org/docs/master/torchvision/transforms.html#torchvision.transforms.Resize 218
but when I use it
transforms.Compose([
transforms.Resize(size=(224, 224)),
transforms.ToTensor(),
transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])
])
I get the following error:
AttributeError: ‘module’ object has no attribute ‘Resize’
As soon as I change transforms.Resize(size=(224, 224)), to something else like transforms.CenterCrop(224), it starts working.
What is the reason for this problem and how can it be solved?
Thanks.