直接按照官网https://github.com/rbgirshick/py-faster-rcnn上的教程对faster Rcnn进行编译的时候,会发有一些层由于cudnn版本的更新,会报错如下:

/cudnn_sigmoid_layer.cu(13): error: argument of type "cudnnActivationMode_t" is incompatible with parameter of type "cudnnActivationDescriptor_t"

在网上查了一下,是由于cudnn的版本更新,接口不兼容造成的,网上有一些博客上采取了修改接口的方法,但是有好几个cpp以及hpp都会修改,比较麻烦,后来在https://github.com/rbgirshick/py-faster-rcnn/issues/237查到了解决办法:

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.

即用目前最新版本的caffe来编译faster rcnn,因为新版本的caffe是采用的cudnn5,因此再按照官网的教程进行编译就不会出错,我机器上是cudnn6,也可以编译通过。

 

相关文章:

  • 2021-11-27
  • 2021-12-08
  • 2021-11-04
  • 2021-08-25
猜你喜欢
  • 2021-09-25
  • 2021-12-21
  • 2021-04-15
  • 2021-04-19
  • 2021-07-21
  • 2021-09-02
相关资源
相似解决方案