当前位置: 代码迷 >> 综合 >> Ubuntu16.04 caffe (cuda9.0,cudnn7 opencv3.3)
  详细解决方案

Ubuntu16.04 caffe (cuda9.0,cudnn7 opencv3.3)

热度:51   发布时间:2023-12-22 16:17:58.0

安装方式一下博客很详细,只是是把8改成9,6改成7的问题

https://blog.csdn.net/qq_38522972/article/details/83504641

cudnn7 for cuda9.0:

https://download.csdn.net/download/qq_38522972/10795301

下面主要说说caffe编译问题,以上博客很详细,单有一点和与cuda8.0的不同:

还需要修改akefile.config文件!

改为:

 

 如果不修改这个会出现如下错误:

nvcc fatal   :Unsupported gpu architecture 'compute_20'

 

常见问题问题分析1:

/usr/bin/ld:cannot find -lcudnn

collect2: error: ld returned 1 exit status

 

解决方案:肯定是cudnn没配好,仔细查对配置caffe中cudnn这个模块!!!!

https://blog.csdn.net/qq_38522972/article/details/83504641

 

 常见问题问题分析2:

.build_release/lib/libcaffe-nv.so: undefined reference to cv::imread(cv::String const&, int)' 

.build_release/lib/libcaffe-nv.so: undefined reference tocv::imencode(cv::String const&, cv::_InputArray const&, 
std::vector >&, std::vector > const&)'
.build_release/lib/libcaffe-nv.so: undefined reference to `cv::imdecode(cv::_InputArray const&, int)'
collect2: error: ld returned 1 exit status

 解决方案:修改 Makefile文件:

在这行后面加:opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs 

再次make clean

make -j8 

编译

 

  相关解决方案