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
git clone https://github.com/BVLC/caffe.git
cd caffe
cp Makefile.config.example Makefile.config
vi Makefile.config
# Adjust Makefile.config (for example, if using Anaconda Python)
# uncomment CPU_ONLY := 1
最后编译
make all
make pycaffe
跑一下测试(可选)
make test
make runtest
跑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
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有