Xiong Yuanjun
MMLAB, CUHK
CUDA and a supported NVIDIA GPU. At the time of writing this doc, the CUDA version is 5.5. All following instructions will be based on CUDA 5.5.
Download cuda-convnet. The project site is on the github. To get the code, you can both download the zip file, or clone from the github using cmd
git clone https://github.com/dnouri/cuda-convnet.git
Python 2.7 and Numpy, I suggest using WinPython on Windows OS. Why? WinPython contains a python console and numpy-mkl module. Besides, it also embeds many useful packages and a scientific computation friendly Python IDE - Spyder. The installation experience is far from painful compared to install python and all packages related. Remember to install the 64-bit version.
.sln
solution file in VS2010. This is resulted from default directories setting.pyconvnet.vcxproj
with any text editor or xml parser. Since our main execution platform is on a 64-bit windows OS. We only need to modify setting of the profile <release|x64>
.
<AdditionalDependencies>,<AdditionalLibraryDirectories>
CUDA 4.0
(the original code was written with cuda 4.0, however we will use cuda 5.5) and modify any occurrence to CUDA 5.5
.dll
and lib
files may change their names over versions. First look into the depencies and modify the project profile to adapt to these changes.Rebuild
the solution in VS2010. You may come across some errors. Following are some of them, for more help, you can browse the github homepage and its wiki.
USE_MKL
in preprocessor difinition. This enables the mkl support.cutil_inline.h
. Actually it's missing in newer version of CUDA. Refer to this gist and add the file to the projects' Headers
folder.pthread_muted_t undefined
. Try add #include <pthread.h>
in nvmatrix.cuh
..pyd
library called pyconvnet.pyd
. This is the python module of cuda-convnet.($ProjectDir$)/storage2/tiny/cifar-10-batches-py-colmajor/
. The zip file should contains 6 data files and 1 meta-file.PATH
in environment variable. You need these 3 dirs.
(pthread directory)\Pre-built.2\dll\x64
(Intel composer directory)\redist\intel64\mkl
(Intel composer directory)\redist\ia32\mkl
mkl_intel_thread.dll
, pthreadGC2.dll
and pthreadVC2.dll
.python convnet.py --data-path=./storage2/tiny/cifar-10-batches-py-colmajor/ --save-path=./storage2/tmp --test-range=6 --train-range=1-5 --layer-def=./example-layers/layers-19pct.cfg --layer-params=./example-layers/layer-params-19pct.cfg --data-provider=cifar --test-freq=13 --epoch=200
More info coming soon...
Contact me with yjxiong@ie.cuhk.edu.hk.