Deep learning tutorial via http://ufldl.stanford.edu/wiki/index.php/UFLDL_Tutorial