Solved by ptrblck in post #8 
              
              
                CIFAR100 contains images for 100 classes (this is what the 100 stands for), so you need to change the output units to 100 in your last linear layer. If you want to use just 10 classes, you should use CIFAR10 instead.