Seeing this as well. I solved it by making folders for classes in “train” and “test”.
Remember how we did cats and dogs in lesson 1?
train/cats
and train/dogs
I wanted to see what classes we had:
cd train && find . | grep -o [a-z]*.png | sort -u && cd .
We have: airplane, automobile, bird, cat, deer, dog, frog, horse, ship, truck
I made new folders
mkdir train_ test_
I went into one of them to make our classes, created the fn to organize the files, and executed it:
-
cd train_
-
mkdir airplane automobile bird cat deer dog frog horse ship truck
-
cd ..
-
function copytrain { for arg in $@; do cp $(find train -name '*'$arg'.png') train_/$arg/; done; };
-
copytrain $(ls train_ | grep -o "[a-z]*")
It took a few minutes to run. Lots of files.
Then repeat 1-5, but with test
and test_
instead of train
and train_
Now it all works. This is because that from_paths
method is expecting folders for the classes.
Make sure the new folders you created match the names you provide to from_paths
val_name
and trn_name
.