Install and Run cuda-convnet on Windows
2014-07-05 12:01
375 查看
转自:http://personal.ie.cuhk.edu.hk/~xy012/others/install_cudaconvnet.html
MMLAB, CUHK
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
Install and Run cuda-convnet on Windows OS with VS2010
Xiong YuanjunMMLAB, CUHK
Prerequisite
CUDA and a supported NVIDIA GPU. At the time of writing this doc, the CUDA version is5.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[/code]
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.
PThread, for the threading support.
Intel C++ Composer for its intel mkl module.
The Visual Studio Project, kindly provided by
Oriol Vinyals.
Other useful tool: Dependency Walker to look into dll problems.Installation
1. Prepare the Visual Studio Project
Put the content of the visual studio project into the source folder of
cuda-convnet. However, you may not be able to open the.slnsolution file in VS2010. This is resulted from default directories setting.
Openpyconvnet.vcxprojwith 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
.
Search for this profile label, and modify the directory setting to the actual path on your machine. In my experience, labels needing attention include,
Modify the CUDA version identifier. Search forCUDA 4.0(the original code was written with cuda 4.0, however we will use cuda 5.5) and modify any occurrence toCUDA 5.5.
Thedllandlibfiles may change their names over versions. First look into the depencies and modify the project profile to adapt to these changes.
Now you should be able to open the solution in VS2010.2. Compile the code
Rebuildthe 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.
First setUSE_MKLin preprocessor difinition. This enables the mkl support.
The compiler may not find thecutil_inline.h. Actually it's missing in newer version of CUDA. Refer to
this gist and add the file to the projects'Headersfolder.
Compilation error:pthread_muted_t undefined. Try add#includeinnvmatrix.cuh.
After a successful compilation, you will get a.pydlibrary calledpyconvnet.pyd. This is the python module of cuda-convnet.Run the sample
Download the
cifar-10 dataset. Put the content into($ProjectDir$)/storage2/tiny/cifar-10-batches-py-colmajor/. The zip file should contains 6 data files and 1 meta-file.
SetPATHin 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
However, you may still get dll loading fail. So we can directly copy the related dlls into the project folder
(not recommended). As unfortunate as me, I copiedmkl_intel_thread.dll,pthreadGC2.dllandpthreadVC2.dll.
Now let's run the code, type in the command linepython 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
This commnd will run the convnet for 200 iterations and get you a learned classifier.
相关文章推荐
- Install and run DB Query Analyzer 6.04 on Microsoft Windows 10
- Install and run DB Query Analyzer 6.04 on Microsoft Windows 10
- How to install and run Microsoft Windows for free on Linux
- Install and config Apache, PHP, MySql on windows XP
- Install, Configure and Run Dynamips in Windows 7
- How to install ASP.NET 1.1 with IIS7 on Vista and Windows 2008
- Install 64bit versions of Apache, PHP and MySQL on Windows 64bit
- Install and Create MySQL ODBC Connector on Windows 7 64 bit
- Run Nutch In Eclipse on Linux and Windows nutch version 1.0
- How to Install and Run a node.js App on Centos 6.4 64bit
- How to compile and run a simple java file in jenkins on Windows
- Install and Create MySQL ODBC Connector on Windows 7 64 bit window客户通过ODBC连接MYSQL服务器
- Run Nutch In Eclipse on Linux and Windows nutch version 0.9
- Install kinect on ubuntu and run kinect in ros
- Install and Run Scapy on Mac OS X 10.10 (Yosemite)
- How to Install VirtualBox and Windows on your Mac
- How to Install and Run Network Simulator (NS2) v2.35 on Ubuntu 10.04
- Install ITK and VTK on Windows
- Install memcached and memcache for PHP on windows
- 【转】Install Node.js and NPM on Windows