Mint安装Caffe

系统:Linux Mint 17.3 Rosa

安装依赖

sudo apt-get install libatlas-base-dev
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler

 
 

安装Caffe

sudo apt-get install git

git clone https://github.com/BVLC/caffe.git

cd caffe

sudo apt-get install g++

cp Makefile.config.example Makefile.config

我是在服务器上,选择只用CPU(不用GPU)计算,把文件里面的CPU_ONLY := 1取消注释即可。

vi Makefile.config # Adjust Makefile.config (for example, if using Anaconda Python) # uncomment CPU_ONLY := 1

最后编译

make all make pycaffe

跑一下测试(可选)

make test make runtest

使用Caffe

跑MNIST试试

cd caffe sh data/mnist/get_mnist.sh sh examples/mnist/create_mnist.sh vi examples/mnist/lenet_solver.prototxt # 修改 solver_mode 为 CPU ./examples/mnist/train_lenet.sh
Mint安装Caffe_第1张图片

你可能感兴趣的:(Mint安装Caffe)