我最近在看github上mean teacher项目,其中在运行cifar10_test.py时出现了以下错误:
Using these command line args: --batch-size 128 --labeled-batch-size 31 --lr 0.05 --labels data-local/labels/cifar10/4000_balanced_labels/10.txt --workers 2 --checkpoint-epochs 20 --dataset cifar10 --train-subdir train+val --eval-subdir test --arch cifar_shakeshake26 --consistency-type mse --consistency-rampup 5 --consistency 100.0 --logit-distance-cost 0.01 --weight-decay 0.0002 --lr-rampup 0 --nesterov True --epochs 300 --lr-rampdown-epochs 350 --ema-decay 0.99
Traceback (most recent call last):
File "C:\Users\24222\Desktop\pytorch\experiments\cifar10_test.py", line 98, in <module>
run(**run_params)
File "C:\Users\24222\Desktop\pytorch\experiments\cifar10_test.py", line 93, in run
main.main(context)
File "C:\Users\24222\Desktop\pytorch\main.py", line 50, in main
train_loader, eval_loader = create_data_loaders(**dataset_config, args=args)
File "C:\Users\24222\Desktop\pytorch\main.py", line 157, in create_data_loaders
dataset = torchvision.datasets.ImageFolder(traindir, train_transformation)
File "C:\Users\24222\anaconda3\envs\mean1\lib\site-packages\torchvision\datasets\folder.py", line 100, in __init__
classes, class_to_idx = find_classes(root)
File "C:\Users\24222\anaconda3\envs\mean1\lib\site-packages\torchvision\datasets\folder.py", line 24, in find_classes
classes = [d for d in os.listdir(dir) if os.path.isdir(os.path.join(dir, d))]
FileNotFoundError: [WinError 3] 系统找不到指定的路径。: 'data-local/images/cifar/cifar10/by-image\\train+val'
但是我在同main.py文件夹下创建py文件并且运行以下代码返回为true
import os
print(os.path.isdir('data-local/images/cifar/cifar10/by-image\\train+val'))
有人知道是什么情况吗?已经头大一天了