Yesterday on the Mac toss a day is not installed successfully, at night on the Mac mounted a paralleldesktop virtual machine, and then installed Linux, 10 minutes to install, I was drunk =. =
The main process is slightly documented:
1. Installing Blas
sudo Install Libatlas-base-dev
2. Install dependencies
sudo apt-get install Libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev Libhdf5-serial-dev Protobuf-compiler Liblmdb-dev
3. Installing Glog
This to FQ, I put on my Baidu cloud.
tar zxvf glog-0.3. 3. Tar . GZCD glog-0.3. 3 . /Configuremakesudomakeinstall
4. Installing gflags
wget https:// github.com/schuhschuh/gflags/archive/master.zip unzip Master.zip cd gflags -master mkdir build && CD Buildexport cxxflags = " -fpic " && CMake. && make verbose=make sudo make install
This step requires CMake, if not installed, can be installed with sudo apt-get install CMake .
5. Installing Lmdb
git clone git://gitorious.org/mdb/mdb.gitcd mdb/libraries/liblmdbmakesudo makeinstall
If you don't have git installed, install it with sudo apt-get install git .
6. Download Caffe
git clone git://github.com/bvlc/caffe.git
7. Installing Caffe
CP Makefile.config.example Makefile.config
Because there is no GPU here, you need to set cpu_only:= 1 in the Makefile.config file to remove the comment.
and then compile
Make All Make Test make Runtest
After installation we can try to run a lenet on the mnist.
1. Get Mnist Data first
CD Caffe. /data/mnist/get_mnist. SH
2. Then create the lenet, be sure to run the following command at the root of the Caffe, otherwise the "Build/examples/mnist/convert_mnist_data.bin:not found" error will be reported, see here. If there is no GPU, remember to set the Solver_mode in Caffe/examples/mnist/lenet_solver.prototxt to SOLVER_MODE:CPU.
./examples/mnist/train_lenet. SH
Accuracy can reach 0.9912
Reference
[1]http://blog.csdn.net/fengbingchun/article/details/45535741
[2]http://caffe.berkeleyvision.org/install_apt.html
[Caffe]linux installed Caffe (without cuda) and Mnist EXAMPLE