标签:.cpp cnn git for rac nbsp uil declared dict
参考:https://github.com/rbgirshick/py-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/caffe.hpp:7, from src/caffe/parallel.cpp:12: ./include/caffe/util/cudnn.hpp: In function ‘void caffe::cudnn::createPoolingDesc(cudnnPoolingStruct**, caffe::PoolingParameter_PoolMethod, cudnnPoolingMode_t*, int, int, int, int, int, int)’: ./include/caffe/util/cudnn.hpp:127:41: error: too few arguments to function ‘cudnnStatus_t cudnnSetPooling2dDescriptor(cudnnPoolingDescriptor_t, cudnnPoolingMode_t, cudnnNanPropagation_t, int, int, int, int, int, int)’ pad_h, pad_w, stride_h, stride_w)); ^ ./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’ cudnnStatus_t status = condition; ^ In file included from ./include/caffe/util/cudnn.hpp:5:0, from ./include/caffe/util/device_alternate.hpp:40, from ./include/caffe/common.hpp:19, from ./include/caffe/blob.hpp:8, from ./include/caffe/caffe.hpp:7, from src/caffe/parallel.cpp:12: /usr/local/cuda/include/cudnn.h:952:27: note: declared here cudnnStatus_t CUDNNWINAPI cudnnSetPooling2dDescriptor( ^ Makefile:566: recipe for target ‘.build_release/src/caffe/parallel.o‘ failed make: *** [.build_release/src/caffe/parallel.o] Error 1
由于faster cudnn版本低,所以重新拷贝,继续make -j8即可编译成功。
cp caffe/include/caffe/util/cudnn.hpp py-faster-rcnn/caffe-fast-rcnn/include/caffe/util/cudnn.hpp cp caffe/src/caffe/layers/cudnn_* py-faster-rcnn/caffe-fast-rcnn/src/caffe/layers/ cp caffe/include/caffe/layers/cudnn_* py-faster-rcnn/caffe-fast-rcnn/include/caffe/layers/
运行demo时出现:
Traceback (most recent call last): File "/home/peiyuyang/py-faster-rcnn/tools/demo.py", line 17, in <module> from fast_rcnn.config import cfg File "/home/peiyuyang/py-faster-rcnn/tools/../lib/fast_rcnn/config.py", line 23, in <module> from easydict import EasyDict as edict ImportError: No module named easydict
安装模块easydict
pip install easydict
出现:
Traceback (most recent call last): File "/home/peiyuyang/py-faster-rcnn/tools/demo.py", line 18, in <module> from fast_rcnn.test import im_detect File "/home/peiyuyang/py-faster-rcnn/tools/../lib/fast_rcnn/test.py", line 15, in <module> import cv2 ImportError: No module named cv2
安装模块cv2
pip install opencv-python
编译成功。
标签:.cpp cnn git for rac nbsp uil declared dict
原文地址:http://www.cnblogs.com/peiyuYang/p/7785193.html