Open tryerrorman opened 6 years ago
Could you please give a minimal reproduction code that demonstrates this problem?
Thank you for your reply@corenel. The following codes could produce the errors reported before.
from PIL import Image
import torchvision.transforms as transforms
import torch.utils.data
from usps import USPS
transform_list = []
osize = [30,30]
transform_list.append(transforms.Scale(osize, Image.BICUBIC))
transform_list.append(transforms.RandomCrop(28))
transform_list.append(transforms.RandomHorizontalFlip())
transform_list += [transforms.ToTensor(),
transforms.Normalize((0.5, 0.5, 0.5),
(0.5, 0.5, 0.5))]
trans = transforms.Compose(transform_list)
dataset = USPS(root = '.', train=True, transform=trans,download=True)
dataLoader = torch.utils.data.DataLoader(dataset,batch_size = 4, shuffle=True,num_workers = 2)
data = dataLoader.__iter__().next()
Thank you for your share. when I use the usps.py to load the data, a error like this occur: