Have a typo on the code. On the part of `#calculate and print avg test loss` Don't exist the variable "classes", looks that should be "class_total" instead. On for loop / else condition. Now it's: `print('Test Accuracy of %5s: N/A (no training examples)' % (classes[i]))\n"` But looks that should be: `print('Test Accuracy of %5s: N/A (no training examples)' % (class_total[i]))`