This is a Theano implementation of a convolutional neural network. It is possible to configure all the settings, including number of convolutional layers. The system also include hooks for a web interface, for monitoring experiments. A web interface can be used to stop a running job, and other things. The purpose of this system is to create a road extraction system.
- Nesterov momentum and RMSProp
- Easy configuration
- Dataset loader which generate examples from random subsets of an rotated image
- Hooks for web gui interface
- Install all dependencies
$ sudo apt-get install -y gcc g++ gfortran build-essential git wget linux-image-generic libopenblas-dev python-dev python-pip python-nose python-numpy python-scipy
- Install Theano
$ sudo pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git
- Download Cuda 7 toolkit
$ sudo wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.0-28_amd64.deb
- Depackage Cuda
$ sudo dpkg -i cuda-repo-ubuntu1404_7.0-28_amd64.deb
- Install the cuda driver
$ sudo apt-get update
$ sudo apt-get install -y cuda
- Update the path to include cuda nvcc and ld_library_path, and then reboot.
$ echo -e "\nexport PATH=/usr/local/cuda/bin:$PATH\n\nexport LD_LIBRARY_PATH=/usr/local/cuda/lib64" >> .bashrc
- Create a theano config file
$ echo -e "\n[global]\nfloatX=float32\ndevice=gpu\n[mode]=FAST_RUN\n\n[nvcc]\nfastmath=True\n\n[cuda]\nroot=/usr/local/cuda" >> ~/.theanorc
Preliminary guide. Check if this works for Windows
- Install Visual Studio 2013 Community Edition
- Download CUDA 7 toolkit
- Install Anaconda Python 27
- In Windows Command Prompt type
$ conda install mingw libpython
- Use git to download Theano from GitHub
- In the theano folder type:
$ python setup.py develop
- Create a .theanorc file in your home directory and add
[global]
floatX = float32
device = gpu
[nvcc]
flags=-LC:\Anaconda\libs
compiler_bindir=C:\Program Files (x86)\Microsoft Visual Studio 13.0\VC\bin
Make sure the paths for anaconda and visual studio are correct.
##Profile In your .theanorc file, change or enter profile=True. Run system by command CUDA_LAUNCH_BLOCKING=1 python cnn.py