Convolutional neural network exercise from http://ufldl.stanford.edu/