Hi there!
How to fix this issue? I am using torchvision==0.12.0.
Thanks
transformations = transforms.Compose([torchvision.transforms.Scale(224),
transforms.CenterCrop(224), transforms.ToTensor(),
transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])])
model.cuda(gpu)
torchvision.transforms.Scale
was deprecated in favor of torchvision.transforms.Resize
so use the latter transformation in current releases.
2 Likes
Hello Sir,
How about, torchvision.transforms.ElasticTransform
Having an error: AttributeError: module âtorchvision.transformsâ has no attribute âElasticTransformâ
ElasticTransform
was added in this PR in June so ~4 months ago and you might need to update torchvision
to the nightly release.
Thanks a lot for your response