unsupervised feature learning exercise from http://ufldl.stanford.edu/