我试图下载cifar10图像并将其放入数据存储程序,但是问题‘图片应该是PIL或ndarray。得到的<class‘class’>元组‘>一直发生.请帮帮我。_is_pil_image(pic) or _is_numpy(pic)):
--> 102 raise TypeError('pic should be PILIm
作为图像预处理步骤的一部分,我将在我的数据集类中应用HOG过滤器,如下所示: class GetHogData(Dataset):
/usr/local/lib/python3.7/dist-packages/torchvision/transforms/functional_pil.py208 if not _is_pil
TypeError: Caught TypeError in DataLoader worker process 0.python3.6/dist-packages/torchvision/transforms/transforms.py", line 104, in __call__
return F.to_tensor(pic/lib/python3.6/dist-packages/torchvision/transforms
transforms.Normalize( std=[0.229, 0.224, 0.225]# Pass the imagefor preprocessing and the image preprocessed# Reshape, crop, andTypeError: pic should be PILImage</