Caffe 的安装
-
官网:http://caffe.berkeleyvision.org/installation.html
-
博客:https://blog.csdn.net/yhaolpz/article/details/71375762
-
GitHub:https://github.com/BVLC/caffe
安装问题汇总:
-
问题1:.build_release/src/caffe/proto/caffe.pb.h:23:35: fatal error: google/protobuf/arena.h: No such file or directory
原因:安装的anaconda之后导致的protoc版本不对
解决:用sudo make all -j8 代替 make all -j8
-
问题2:undefined reference to `google::protobuf::Message::InitializationErrorString()
原因:Gcc 和 G++ 版本问题
解决:替换gcc和g++版本, caffe:make clean, make all
< center >
# 1.查看已有的gcc和g++版本
ls /usr/bin/g*
# 2.替换gcc的软连接
sudo ln -s /usr/bin/gcc-5 /usr/bin/gcc -f
sudo ln -s /usr/bin/g++-5 /usr/bin/g++ -f
< center >
博客:https://blog.csdn.net/weixin_28900531/article/details/79697450
-
问题3:locale::facet::_S_create_c_locale name not valid and where TypeParam = caffe::CPUDevice , where TypeParam = caffe::GPUDevice.
错误:
解决:命令行执行 export LC_ALL="C", 去除本地系统的 locale 配置,使用服务器的配置。
export LC_ALL="C"
参考:博客(https://blog.csdn.net/fly2leo/article/details/78537127)
-
问题4:cuda 指定GPU
解决:export CUDA_VISIBLE_DEVICES=0,1 ##仅显卡设备0,1GPU可见。可用的GPU可通过nvidia-smi -L命令查看
参考:博客(https://blog.csdn.net/u010454261/article/details/70236988/)
- 问题5:python/caffe/_caffe.cpp:10:31: fatal error: numpy/arrayobject.h: No such file or directory
- 错误原因如下:没安装numpy, Makefile.config文件未修改Python目录,numpy安装位置不匹配
- 博客(https://blog.csdn.net/wuzuyu365/article/details/52430657),
Caffe的使用
问题汇总:
-
问题1:./examples/cifar10/create_cifar10.sh ==》F1212 21:58:46.598824 27706 db_lmdb.hpp:15] Check failed: mdb_status == 0 (5 vs. 0) Input/output error
原因:可能是你的home盘没空间了~~~
解决:千年难遇~
-
问题2:im2col_layer.cpp Check failed: too many resources requested for launch
原因:内存或是寄存器不够
解决:减小your_model_train_val.prototxt文件中的batch_size大小