Since I'm new to PyTorch, when I add transforms.CenterCrop(size) to get my dataloader, this error occur
File "~/triplet-network-pytorch/triplet_data_loader.py", line 73, in __getitem__
img1 = self.transform(img1)
File "build/bdist.linux-x86_64/egg/torchvision/transforms.py", line 29, in __call__
img = t(img)
File "build/bdist.linux-x86_64/egg/torchvision/transforms.py", line 156, in __call__
w, h = img.size
TypeError: 'builtin_function_or_method' object is not iterable
Since I'm new to PyTorch, when I add
transforms.CenterCrop(size)
to get my dataloader, this error occurIf I add
transforms.CenterCrop(28)
toMNIST_t(*)
,It also occur such error. Could you please help me solve it?