Windows 10 installs the configuration Caffe and supports GPU acceleration (change)

Source: Internet
Author: User

Basic Environment

It is recommended to strictly follow the version
-Windows 10
-Visual Studio 2013
-Matlab r2016b
-Anaconda
-CUDA 8.0.44
-CuDNN V4

1. Installing Cuda 8.0


After installation, the program automatically adds a CUDA_PATH environment variable:

2. Download CUDNN

Before downloading, you need to register a number on the developer online, simply fill in the basic material.


The next is a compressed package, there is no way to install, the compressed package contains three files, respectively, Bin,include,lib, unzip them, get a folder called Cuda.

3. Download the caffe source from Microsoft GitHub

Note, generally speaking Windows configuration Caffe is difficult, the reason is that the Caffe package can not go to normal official website download, this Microsoft Caffe really give us a lot of trouble, so, emphasize, go to this link download Caffe source of compression package!
Https://github.com/Microsoft/caffe

After downloading, unzip the file and get a folder called Caffe-master.

4. Install Caffe4.1 Open the Caffe-master folder, then see a Windows folder, and then continue to open the Windows folder, See inside a CommonSettings.props.example file, copy it out, and change the name to Commonsettings.props.

4.2 Open the Caffe.sln under Windows folder with Visual Studio 2013, check the project in the solution, and focus on whether Libcaffe and Test_all have been successfully imported.


If these two are not imported successfully because of the lack of Cuda 8.0.props in the installation path of Visual Studio 2013 (or if your version number is incorrectly written in commonsettings.props), mine is this path
C:\Program Files (x86) \msbuild\microsoft.cpp\v4.0\v120\buildcustomizations
In fact Cuda 8.0.props is in the Cuda installation directory, my path is
C:\Program Files\nvidia GPU Computing toolkit\cuda\v8.0\extras\visual_studio_integration\msbuildextensions
Just copy to
C:\Program Files (x86) \msbuild\microsoft.cpp\v4.0\v120\buildcustomizations
OK, then Libcaffe and Testall are all right! (The above solution belongs to the reference, the blogger actually imported these two items.) )

4.3 Setting Libcaffe as Startup Project

The Libcaffe method is to right-click and select Set as Startup Project.

4.4 Open the solution in the commensetting.probs, Cudnnpath there to store the extracted cudnn out of the folder Cuda directory path into it. (For example, I am here under the F:\windows+caffe)


That is, extract the Cuda folder from Cudnn-7.5-windows7-x64-v5.1-rc.zip, assuming the location under F:\windows+caffe, then Cudnnpath is set to F:\windows+caffe. This is because the program will automatically add Cuda to you, for example (Cudnnpath) \cuda\lib\x64;$ (LibraryPath). So all you need to do is specify its parent directory.

4.5 solution configuration set to release

4.6 Select Debug->libcaffe Properties in the menu ...


There are two places that need to be modified, which are general in the configuration properties and regular in C/s, as shown in

4.7 Start compiling


A long wait .....
Until the compilation is successful, Lucky boy, I am here to jump out of this hint, temporarily did not go to him, anyway, there is no mistake on the first

4.8 View Loot

A folder named build should be generated under the Caffe_master folder, and the successful and required files for subsequent compilation will be stored in the. \build\x64\relase below.

At this point, the description ' Libcaffe ' has been successfully compiled.

5. Compiling Caffe

Right-click on the Select Property (properties) above the solution in Visual Studio 2013


Can see the original is a single project start, compile Libcaffe, then we choose to compile Caffe, can also choose more tasks to compile.

Start compiling, long wait ..... After that, it will be compiled successfully! You can go and see the loot.

WINDOWS10 Install configuration caffe and support GPU acceleration
The installation material used in this paper: Baidu Network disk

The original is in the Windows7 system configuration environment, Matlab2016a,cuda is 7.5.

my differences; win10,matlab2016b,cuda8.0. The results are successful.

Windows 10 installs the configuration Caffe and supports GPU acceleration (change)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.