Hi everyone,
I have met a problem when loading my own dataset,
trainset = torchvision.datasets.ImageFolder(root='../dataset/', 
                            transform=transforms.Compose([
                            transforms.ToTensor(),
                            transforms.Scale((64,64))
                            ]))

trainloader = torch.utils.data.DataLoader(trainset, batch_size=batch_size,
                                      shuffle=True, num_workers=2)

data = iter(trainloader)
imgs = data.next()[0]

And I got the error:
AttributeError: Traceback (most recent call last):
File “/usr/local/lib/python2.7/dist-packages/torch/utils/data/dataloader.py”, line 41, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File “/usr/local/lib/python2.7/dist-packages/torchvision/datasets/folder.py”, line 118, in getitem
img = self.transform(img)
File “/usr/local/lib/python2.7/dist-packages/torchvision/transforms.py”, line 34, in call
img = t(img)
File “/usr/local/lib/python2.7/dist-packages/torchvision/transforms.py”, line 199, in call
return img.resize(self.size, self.interpolation)
AttributeError: ‘torch.FloatTensor’ object has no attribute ‘resize’
any idea? thanks.