A (relatively) simple feed-forward neural network in NumPy/Cython. Only basic layers for multi-layer perceptrons and convolutional neural networks are implemented.
This code is meant as an example implementation and for small experiments. Its performance does not scale to large quantities of data!
Steps to run programs Option 1(both OS X and linux):
- pip install virtualenv
- git clone the repository using the command git clone
- cd into the repository
- virtualenv dlw
- source dlw/bin/activate
- pip install -r requirements.txt
- python setup.py build
Option 2(linux):
- sudo apt-get install python-dev
- sudo apt-get install python-numpy
- sudo apt-get install cython
- sudo apt-get install python-scipy
- sudo apt-get install python-matplotlib
- python setup.py build
This should create build folder in the root folder
Running fuly connected networks:
- cd fullyconnected
- run wrapper.py
- This will start training the feedforward network.
- It will start training in batches.
- The files will also save receptive fields as npz files
- run rf.py 'nameofweighfile.npz' 'nameofweightfile.npz' ...
Running RBM code:
- cd rbm
- python rbm_multiple_layers.py
- This will show after training reconstrunction of output
- python rbm_svm.py
- This will build a classification model of svm over rbm
Running CNN code:
- cd CNN
- python cnn_mnist.py
- This will start the cnn training