Caffe Installation (9): Caffe Download and compile

Source: Internet
Author: User
Tags intel mkl

Go to official github to download the Caffe zip file and unzip it

CD to Caffe-master folder, generate Makefile.config configuration file, execute:

$ CP Makefile.config.example Makefile.config

Configure Makefile.config file (only the modified parts are listed)

A. If you enable CUDNN, remove the "#" in front of it

USE_CUDNN: = 1

B. Configure some reference files (the additional part is mainly to solve the problem of the HDF5 path under the new version)

Include_dirs: = $ (python_include)/usr/local/include/usr/lib/x86_64-linux-gnu/hdf5/serial/include

Library_dirs: = $ (python_lib)/usr/local/lib/usr/lib/usr/lib/x86_64-linux-gnu/hdf5/serial

C. Enable Intel Parallel Studio XE (Intel MKL) or Atlas (two previously described)

BLAS: = Mkl

or Blas: =altas

D. Configuring the path for Caffe support for Python and MATLAB interfaces

Python_lib: =/usr/local/lib

If the use of Anaconda, etc., change to the corresponding path. The use of Anaconda is not recommended and is prone to problems.

Matlab_dir: =/usr/local/matlab/r2014a

C. If OpenCV 3.0 is enabled, remove the "#"

Opencv_version =3

I'm using opencv-2.4.9, so I'm not canceling the comment here.

D. Use_python_wrapper Uncomment

Compiling Caffe-master

"-j32" is compiled using multi-core CPU, which can greatly accelerate the speed of compiling, it is recommended.

$ make All–j32

$ make Test–j32

$ make Runtest–j32

If make fails to be re-make, first

$ make clean

Compile the caffe files used by Python and matlab

$ make Pycaffe–j32

$ make Matcaffe–j32

Caffe Installation (9): Caffe Download and compile

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.