I'm very surprised that this worked with the small amount of training data he provided! (he "provided the algorithm ten images containing hand written digits..." - if we generously estimate that each image has 10 training images, that's only 100 training examples)