Reference: https://blog.csdn.net/zoro_lov3/article/details/60581174
The latest faster r-cnn is not compatible with cudnn 5.1, and a code error will be reported when compiling caffe-fast-rcnn.
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/util/db.hpp:6, from src/caffe/util/db.cpp:1: /usr/local/cuda/include/cudnn.h:803:27: note: declared here cudnnStatus_t CUDNNWINAPI cudnnSetPooling2dDescriptor( ^ make: *** [.build_release/src/caffe/util/db.o] Error 1
Solution:
Method 1: Use git to modify
cd caffe-fast-rcnn git remote add caffe https://github.com/BVLC/caffe.git git fetch caffe git merge -X theirs caffe/master
Then comment out self_.attr("phase") = static_cast(this->phase_) in the include/caffe/layers/python_layer.hpp file after merging
Method 2: Manual modification
Replace the corresponding files of faster rcnn with the following files of the latest caffe source code
include/caffe/layers/cudnn_relu_layer.hpp, src/caffe/layers/cudnn_relu_layer.cpp, src/caffe/layers/cudnn_relu_layer.cu
include/caffe/layers/cudnn_sigmoid_layer.hpp, src/caffe/layers/cudnn_sigmoid_layer.cpp, src/caffe/layers/cudnn_sigmoid_layer.cu
include/caffe/layers/cudnn_tanh_layer.hpp, src/caffe/layers/cudnn_tanh_layer.cpp, src/caffe/layers/cudnn_tanh_layer.cu
Replace the corresponding file of faster rcnn with this file in the caffe source code
include/caffe/util/cudnn.hpp
Replace all cudnnConvolutionBackwardData_v3 function names in the src/caffe/layers/cudnn_conv_layer.cu file in faster rcnn with cudnnConvolutionBackwardData
cudnnConvolutionBackwardFilter_v3 function names with cudnnConvolutionBackwardFilter
Question two,
ImportError: No module named _tkinter
cryhelyxx@ada:~/ python_workspace$ python httpurl.py Traceback (most recent call last): File "httpurl.py", line 4, in <module> import Tkinter File "/usr/local/lib/python2.7/lib-tk/Tkinter.py", line 39, in <module> import _tkinter # If this fails your Python may not be configured for Tk ImportError: No module named _tkinter
sudo apt-get install python-tk