When I ran the code, I met the following error:
x = transforms.RandomResizedCrop(self.image_size, interpolation=Image.BICUBIC)(img)
File "/home/harry/anaconda2/envs/css/lib/python3.6/site-packages/torchvision/transforms/transforms.py", line 387, in call
i, j, h, w = self.get_params(img, self.scale, self.ratio)
File "/home/harry/anaconda2/envs/css/lib/python3.6/site-packages/torchvision/transforms/transforms.py", line 358, in get_params
area = img.size[0] * img.size[1]
TypeError: 'builtin_function_or_method' object is not subscriptable
It maybe because of the version of torchvision. Would you please offer the environment that you used?
Specially torch and torchvision. I had tried torch=1.6, 0.4.1, it did not work!
Hi, nice job!
When I ran the code, I met the following error: x = transforms.RandomResizedCrop(self.image_size, interpolation=Image.BICUBIC)(img) File "/home/harry/anaconda2/envs/css/lib/python3.6/site-packages/torchvision/transforms/transforms.py", line 387, in call i, j, h, w = self.get_params(img, self.scale, self.ratio) File "/home/harry/anaconda2/envs/css/lib/python3.6/site-packages/torchvision/transforms/transforms.py", line 358, in get_params area = img.size[0] * img.size[1] TypeError: 'builtin_function_or_method' object is not subscriptable
It maybe because of the version of torchvision. Would you please offer the environment that you used? Specially torch and torchvision. I had tried torch=1.6, 0.4.1, it did not work!
Thank you very much!