Caffe-Faster-RCNN在编译时遇到如下错误:
In file included from ./include/caffe/util/device_alternate.hpp:40:0,
from ./include/caffe/common.hpp:19,
from ./include/caffe/blob.hpp:8,
from ./include/caffe/layers/softmax_loss_layer.hpp:6,
from src/caffe/layers/softmax_loss_layer.cpp:5:
./include/caffe/util/cudnn.hpp:8:34: fatal error: caffe/proto/caffe.pb.h: No such file or directory
compilation terminated.
由于Faster-RCNN对应的Cudnn版本较老,所以更新Cudnn等文件即可。
解决方法:
在$Faster-RCNN_ROOT/caffe-fast-rcnn目录下
cp caffe-root/include/caffe/util/cudnn.hpp include/caffe/util/cudnn.hpp
cp caffe-root/src/caffe/layers/cudnn_* src/caffe/layers/
cp caffe-root/include/caffe/layers/cudnn_* include/caffe/layers/
再次make clean之后,重新编译即可通过。