本文总结了我自己实验caffe的各种make大坑(其实是自己太菜了)
话不多说,分条罗列,希望以后遇到能记得:
1.Makefile.config文件
from:cp Makfile.config.example Makfile.config
复制example的,修改的配置往往有:
OPENCV=3
USE_CUDNN=1
cuda路径
Python路径
各种需要用到的路径
2.关于opencv
OPENCV_VERSION := 3,caffe版本比较老的话,可自行添加
用linux命令 diff a b 比较Makefile和Makfile.config的不同,一样就应该没问题
多版本opencv,软连接最好删除,命令:sudo apt-get autoremove libopencv-dev
3.caffe faster rcnn版本无法用cudnn5
cd caffe-fast-rcnn
git remote add caffe https://github.com/BVLC/caffe.git
git fetch caffe
git merge -X theirs caffe/master
Remove self_.attr("phase") = static_cast<int>(this->phase_);
from include/caffe/layers/python_layer.hpp
after merging.
今天主要就是这两个bug,唉,在make caffe上真的心累啊!!!记住坑,我就不性搞不定大多数问题。