Compiling the environment
VMWare Workstation Player
Ubuntu-15.10-desktop-amd64
CPU 4700MQ, allocating 6 cores +4GB memory +80GB HDD to VM
Compile step
The main reference is Caffe official website
Http://caffe.berkeleyvision.org/install_apt.html
1. Install the Basic Package
sudo apt-get install Libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev Protobuf-compiler
sudo apt-get install--no-install-recommends Libboost-all-dev
Cuda: Because the video card is 750m, does not support Cuda, will not get
Blas:sudo Apt-get Install Libatlas-base-dev
Python:sudo Apt-get Install Python-dev
Other:sudo apt-get Install Libgflags-dev Libgoogle-glog-dev Liblmdb-dev
2. Download Caffe & Configuration
Go directly to GitHub to download the latest Caffe:https://github.com/bvlc/caffe click on the download Zip button to download caffe-master.zip
Unzip Caffe-master.zip
CD Caffe-master
Http://caffe.berkeleyvision.org/installation.html#compilation, copy and modify Makefile.config files according to the website guidelines
CP Makefile.config.example Makefile.config
Since I don't have a cuda-enabled GPU, I need to
# cpu_only: = 1
This line cancels the comment, indicating that only the CPU is used for the calculation
3. Compiling
Make all
Make Test
Make Runtest
The first two make can add-j6 parameters to multi-threaded compilation, improve efficiency
The last make is run for testing, using multithreading does not improve speed
Problems that you may encounter
When make all, an error occurs and the error message is:
Hdf5.h could not being found
1. sudo apt-get install Libhdf5-dev
2. Modify the Makefile.config file
Include_dirs: = $ (python_include)/usr/local/include /usr/include/hdf5/serial/
3. Add a link relationship
Cd/usr/lib/x86_64-linux-gnu
sudo ln-s libhdf5_serial.so.8.0.2 libhdf5.so
sudo ln-s libhdf5_serial_hl.so.8.0.2 libhdf5_hl.so
Reference from https://github.com/BVLC/caffe/issues/2347
And then recompile to
Compile Caffe (UBUNTU-15.10-DESKTOP-AMD64, Cuda-free)