参考来自:http://blog.csdn.net/fengbingchun/article/details/45535741/
感谢大神的博客,本文只用于个人学习作笔记用途。
初次使用Caffe,先简单熟悉一下,把Caffe跑通了再说。
对于我这种小白用户,肯定先从最简单的入手比较好。
下面是安装步骤:
1. 安装Ubuntu 15.04系统,使用终端输入命令
2. 安装BLAS:
$
sudo apt-get install libatlas-base-dev
3. 安装多个依赖项:
$
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev protobuf-compiler liblmdb-dev libgflags-dev libgoogle-glog-dev liblmdb-dev
4. 下载Caffe:
$
git clone git://github.com/BVLC/caffe.git
5. 在Caffe目录下,安装Caffe:(1)
$
cp Makefile.config.example Makefile.config (2)修改Makefile.config文件:去掉注释, CPU_ONLY:= 1 (3)
$
make all (4)
$
make test (5)
$
make runtest
说明:(1)在15.04下,可能提示hdf5.h 不存在,这时,在编译过程中,将 #include “hdf5.h” 改为 #include “hdf5/serial/hdf5.h”,以及将#include “hdf5_hl.h”#include “hdf5/serial/hdf5_hl.h”(2)还有个问题就是提示”cannot find hdf5”,这时在Makefile.config文件中,把LIBRARY_DIRS一段修改为“LIBRARY_DIRS:=
$
(PYTHON_LIB) /usr/local/lib /usr/lib /usr/x86_64-linux-gnu/hdf5/serial”
全部跑通之后,就可以开始尝试着跑下examples。