One of Caffe Learning: Caffe Configuration and compilation __caffe

Source: Internet
Author: User
Recently, in learning deep learning, the tool used is caffe, easier to use, not long-winded, first of all, said the configuration and compilation of the environment.
the platform of the system is win10+matlab2014b+vs2013.
Before starting, to install the Cuda driver, I use the Cuda 7.5 version (to sync with the version used inside the Caffe).
First, in https://github.com/happynear/caffe-windowsDownload Caffe and ThirdParty on this page (thanks to the author), Be sure to note that the version is correct (currently using Cuda 7.5), otherwise it may not open the VC file inside, resulting in the inability to compile, if you want to use other versions of the Cuda, it needs to modify the project file in VS, the landlord is because the version is not correct, compiled at the time of the compilation.
Second, after downloading these two files, will thirdparty decompression, obtains three folders bin\, include\ as well as lib\, copies this three folders all to the Caffe root directory, This is caffe-windows-master the folder below (you may change your name.) According to their own circumstances), Another important step is to add bin\ this file to the path of the system environment variable
Third Open the Caffe root directory in the buildVS013 folder inside the MainBuilder.sln this project file, if not open, may be cuda version of the installation is not correct, check the project file inside the use of what version, open this directory Caffelib folder inside the Vcxpro J file, open with Notepad, and reinstall the corresponding version of the Cuda driver.
Four, after opening, you can see that there are 7 items, respectively, Caffe,caffelib,compute_image_mean (calculate the mean value of the image, will be used later), Convert_imageset (convert the picture data to Lmdb or LEVELDB, Will be used later, Convert_mnist_data (convert mnist DataSet), Matcaffe (Generate Caffe Matlab interface) and Pycaffe (generate Caffe of the Py interface). Among them, we need to use the Caffe Matlab interface, then also need to configure.
Five, configure the properties of the Matcaffe. Select Matcaffe, and then right-click, open the properties, open C + + and linker These two, will be inside the MATLAB library file and Lib file path to their own MATLAB below the library file and Lib file, and then click OK.
So far, the configuration of the entire environment is no problem. Then select Caffe, right-click, select Build, start compiling, about half an hour later can compile complete. Then select Matcaffe, the same compilation, you can get Caffe Matlab interface caffe_.mexw64. Then, you can decide to test, before testing, the Caffe root directory under the Caffe folder added to the MATLAB system path, and then open this folder, find the Demo folder, open, find Classification_ DEMO.M file, follow the instructions inside to run, remember, need to download a caffemodel, this can be online Baidu.




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.