/sdsc

Primary LanguageJupyter NotebookApache License 2.0Apache-2.0

This repository includes python code and jupyter notebook for an introduction to Convolution Neural Network (CNN) and Recurrent Neural Network (RNN).

Instruction

The notebooks have been tested using miniconda3 with python3.6 and python3.5. Latest Keras (>=v2.0.9) is required to run the RNN code, which uses the RNN class.

To run the notebooks, here are some instructions

  1. install the dependent libraries including, keras + tensorflow, jupyter notebook and others in requirements.txt
    conda install tensorflow     
    # or with gpu 
    conda install tensorflow-gpu
    
    git clone https://github.com/fchollet/keras.git
    cd keras
    python setup.py install 
    
    conda install --file requirements.txt
  1. create the checkpoint folder, ckpt and data/ folder.
  2. download the dataset into data/ folder. Details are inside the notebooks.

Here are the instructions to setup the GPU instance on Amazon AWS. NOTE: select the nearest AWS region with GPU, e.g. Singapore. You can use cheaper GPU instances like g2.2xlarge. You can also use Google Cloud, which has GPUs in Region Taiwan.

Credit

We adapt code from keras example and fast.ai courses to creat the notebooks.

  • MNIST CNN, CNN and RNN for sentiment analysis, Char RNN, Seq2Seq are from keras.
  • CNN fine-tune is from fast.ai.