Install Theano 7.0 on Windows 8.1 64 bit (Update 2015.6)

Installing Theano is a pain in the ass if it is on Windows 8.1. Here is the breakdown of how to install it on my Windows 8.1 64bit machine: 1. Install Python 2.7.x: https://www.python.org/downloads/ 2. Install MinGW64: http://sourceforge.net/projects/mingw-w64/. After the installation of MinGW64, add `install_path_to_mingw64/bin` to your `PATH` variable. A caveat is to put the path at …

Replicate the vanishing and exploding gradient problems in Recurrent Neural Network

I’ve talked about the vanishing gradient problem in one old post in normal multiple layer neural networks. Pascanur et al. (the first in References below) particularly discussed the vanishing gradient problem as well as another type of gradient instable issue, the exploding gradient problem in the scope of recurrent neural network.   Let’s recap the …

Sparse AutoEncoder

Andrew Ng Tutorial: https://web.stanford.edu/class/cs294a/sparseAutoencoder_2011new.pdf UFLDL Exercise: http://ufldl.stanford.edu/wiki/index.php/Exercise:Sparse_Autoencoder A Chinese blog: http://www.cnblogs.com/tornadomeet/archive/2013/03/20/2970724.html Stacked Denoising Autoencoder (paper): http://jmlr.csail.mit.edu/papers/volume11/vincent10a/vincent10a.pdf

Convolutional Neural Network Simple Tutorial

I am going to demonstrate a simple version of convolutional neural network, a type of deep learning structure in this post.  Motivation Knowing normal multi-layer neural network (probably the one with input layer, output layer and one hidden layer) is helpful before you proceed reading this post. A good tutorial of MLN can be found …

How to run JupyterHub on Ubuntu?

JupyterHub is an Ipython notebook extension which supports multi-user logins. (https://github.com/jupyter/jupyterhub). Installation of JupyterHub, however, requires a bit work due to their incomplete docs and complicated dependencies. Here are the steps I went through to run JupyterHub on my Ubuntu machine: 1. Set alias. JupyerHub will use Python 3.x instead of Python 2.7. But Ubuntu …

How to convert Matlab variables to numpy variables?

Background If you have a Matlab variable, say a matrix, that you want to read in Python. How will you do that? In this post, I am introducing a way that works 100%. 1. Save Matlab variable(s) to ‘.mat’ file. save(‘your_file_name.mat’, ‘first_var’, ‘second_var’,…) 2.  In Python, load ‘.mat’ file using `scipy.io`. import scipy.io scipy.io.loadmat(‘your_file_name.mat’) References: …

Compile Cython Module on Windows

In this post, I am showing how to compile Cython modules on Windows, which often leads to weird error messages. (Cython references: http://cython.org/, http://docs.cython.org/index.html, https://github.com/cython/cython) 1. You should already have correct structure to hold your “.pyx” file. Also, `setup.py` needs to be correctly configured. The following shows an example of `setup.py`: try: from setuptools import …