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