依赖及下载caffe仓库:
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
sudo apt-get install libatlas-base-dev
sudo apt-get install libhdf5-serial-dev
sudo apt-get install python-dev
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev
sudo apt-get install libopenblas-dev
git clone https://github.com/BVLC/caffe.git
进入caffe目录新建build并进入build
cmake:编译
cmake -DCMAKE_INSTALL_PREFIX=/usr ../
进入example 的 mnist ,编译一个 程序看看 环境是否ok:
g++ convert_mnist_data.cpp -D CPU_ONLY -l glog -o convert_mnist