Solved by ptrblck in post #2 
              
              
                Regarding the mismatch between the folders and the class predictions: 
If you are using ImageFolder, the folders will be sorted internally, such that 
1 - class0
10 - class1
11 - class2
...
2 - ...
20 - ...
21 - ...

You could append zeros in front of your folder names: 
01 - class0
02 - class1
03 -…