Win7 Configuring Microsoft's Deep Learning Caffe

Source: Internet
Author: User

Official download: Https://github.com/Microsoft/caffe then directly modify the Caffe directory under the Windows directory of the project under the props file configuration to support which features, and then directly open vs Project compilation can be completed, What a good word (NuGet automatically handles dependency issues) (1) Note that the bind to modify Python is true, (2) MATLAB is bound to True, (3) USECUDNN is False (4) Cuda Arch is compute_30 and sm_ 30 (This is based on your own graphics card calculation ability to determine, note CUDA7.5 has not supported a graphics card with less than 30 computing power, tragedy! ) (5) If invalid device function appears at run time, the GPU's schema is wrong, (6) additionally CUDA7.5 deleted compute_20 and sm_20
If you write a python extension in C, you can't find Python27_d.libMethod One: Directly install the debug version of the Python27 method two: 1. Copy the python27 in the Libs directory under the Python installation directory and name it python27_d.lib 2. Modify the pyconfig.h in the Include directory to Define Py_debug Comment out
There's one more question I've found in a group where people often ask questions about the caffe of compiling bindings.
First you have to execute make Matcaffe make Pycaffe in the Caffe root to compile the bindings of MATLAB and Python bindings above these two commands, you execute according to your own needs, if you want to compile Python bindings, then do the following.
Actually someone will not add the path to Python okay, go to Caffe/python path to open terminal, then execute Python, enter import Caffe Windows version in E:\caffe-win\Build\x64\Release\ Execute Python under Pycaffe and enter import Caffe.
The Caffe Matlab of Windows class needs to add E:\caffe-win\Build\x64\Release\matcaffe to the path. Linux versions of Caffe need to add Caffe/matlab to the path of MATLAB

-------------------------------------------------------------------------------------------------

1. First go to GitHub to download Microsoft's Caffe
Https://github.com/Microsoft/caffe
Unzip the file to any location
2. Download the CUDA7.5 and install
Https://developer.nvidia.com/cuda-toolkit
Download CUDNN v4
Cudnn need to apply to download, here I provide network to everyone HTTP://PAN.BAIDU.COM/S/1PJVB0TT
CUDNN decompression, Cudnn in the bin, include, Lib folder, to extract the contents of the folder, put into Cuda bin, include, Lib folder, my Cuda path in
C:\Program Files\nvidia GPU Computing toolkit\cuda\v7.5
3. Download Python
Here is the Winpython collection package, please download the 64-bit version
https://sourceforge.net/projects/winpython/files/WinPython_2.7/2.7.10.3/
Installing Winpython
Note: Download the 64-bit python2.7 version, if not Winpython,anaconda is also possible
4. Install vs2013, note here vs2013 installation is best installed in the default C-drive location.
"E:\NugetPackages\OpenCV.2.4.10\build\native \opencv.targets (57,5): Error MSB3030: Unable to copy file" if not in the C-drive location C:\Program Files (x86) \microsoft Visual Studio 12.0\vc\redist\x64\microsoft.vc120.crt\msvcr120.dll "
This can be solved, you find your installed vs directory, find the Microsoft Visual Studio 12.0 folder, the entire copy to his location can
5. Open the Caffe-master\windows folder, Copy the CommonSettings.props.example, and then rename the CommonSettings.props.example to Commonsettings.props.
Open Commonsettings.props in text format,


Change False to True;

Switch
, if the installation is Anaconda, can be changed to C:\Anaconda, to ensure that the next level of python.exe can be;

Change the path to your MATLAB installation path
6. Compiling Caffe
Click Caffe.sln in the E:\caffe-master\windows folder when you find that the 9 projects in the solution Libcaffe and Test_all did not load successfully. However, first switch the compiler to release x64. Then click on the local Windows debugger, NuGet will download some of the necessary library files, after downloading, continue to compile operations, there may be some errors in the middle
After the solution, right-click on each item, attribute->c/c++, adjust "warning level" to level 3, and "treat warning as error" to No.
Error "Error C2220: Warning is treated as error-no" Object "is generated, the solution is to use vs2013 to open the correct CPP, and then click Save. I'm here to boost the error in NuGet.

This is just the completion of the compilation of the Libcaffe project, the following one right-click the remaining 8 items, and then click "Generate", you can.
7. Adding variables
In the user variable of the environment variable, create a new user variable, the variable name "PythonPath", and the variable value "E:\caffe-master\Build\x64\Release\pycaffe".
At this point, has completed Caffe on the Win7 configuration, Python and MATLAB interface has been configured, you can open Winpython, import Caffe, if no error, Caffe configuration success

Win7 Configuring Microsoft's Deep Learning Caffe

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.