当前位置:网站首页>RuntimeError: Dataset not found or corrupted. You can use download=True to download it

RuntimeError: Dataset not found or corrupted. You can use download=True to download it

2022-06-09 06:14:00 GodGump

把相应数据集的调用里面加入参数download=True即可
比如我的错误代码:

train = CIFAR10(root='data', train=True, transform=Compose([ToTensor()]), download=True)

改写为这样既可

train = CIFAR10(root='data', train=True, transform=Compose([ToTensor()]), download=True)
原网站

版权声明
本文为[GodGump]所创,转载请带上原文链接,感谢
https://blog.csdn.net/GodGump/article/details/125013645