root的绝对路径只写到cifar-10-batches-py的上一个目录就行了,而且cifar-10-batches-py不能改,改了就识别不到。
数据集在D:\1StudyFiles\ProfessionalFiles\dl_pytorch_v2_Files_Wumaogui\data\data\cifar-10-batches-py,里面,绝对路径写成下面
trainset = torchvision.datasets.CIFAR10(root='D:/1StudyFiles/ProfessionalFiles/dl_pytorch_v2_Files_Wumaogui/data/data/',
train= True, download= False, transform=transorm)