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 …

Life saving tips for PyDev

I wrote a very useful post a year ago, talking about 20 life-saving tips in Eclipse: http://maider.blog.sohu.com/281903297.html. In that context, the tips focus more on efficiency during Java development. In this post, several tips particularly useful for Python developers are collected. I will continue updating the post whenever I find something useful. 1. Press `F2` …