confirmed. when I moved the 50 000 train and 10 000 test files into nested subdirectories, dataloader worked. I don’t know why this is ‘new’
Excuse if the below code is awful python. I don’t like looping individual files. (note I haven’t put in code to delete the original files)
#note plane would work for airplane, car wouldnt for automobile
classes = ('airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck')
cd ./data/cifar10/train
#cd ./data/cifar10/test
for c in classes:
%mkdir $c
import fnmatch
allpng=fnmatch.filter(os.listdir(), '*.png')
for c in classes:
c_list = fnmatch.filter(allpng, '*'+c+'*')
for fn in c_list:
shutil.copy( fn, c)
And now I see a 2nd thread on this same thing… Not a Directory error in CIFAR10 exercise