1. 程式人生 > >./include/caffe/util/cudnn.hpp: error: too few arguments to function ‘SetPooling2dDescriptor

./include/caffe/util/cudnn.hpp: error: too few arguments to function ‘SetPooling2dDescriptor

https://blog.csdn.net/tianrolin/article/details/71246472

這是由於所使用的cuDNN版本不一致的導致的,作者配置環境是cuDNN 4.0,但是5.0版本後的cuDNN介面有所變化。

解決方法:將以下幾個檔案用最新BVLC版本的caffe對應檔案替換並重新編譯

./include/caffe/util/cudnn.hpp
./include/caffe/layers/cudnn_conv_layer.hpp
./include/caffe/layers/cudnn_relu_layer.hpp
./include/caffe/layers/cudnn_sigmoid_layer.hpp
./include/caffe/layers/cudnn_tanh_layer.hpp
./src/caffe/layers/cudnn_conv_layer.cpp ./src/caffe/layers/cudnn_conv_layer.cu ./src/caffe/layers/cudnn_relu_layer.cpp ./src/caffe/layers/cudnn_relu_layer.cu ./src/caffe/layers/cudnn_sigmoid_layer.cpp ./src/caffe/layers/cudnn_sigmoid_layer.cu ./src/caffe/layers/cudnn_tanh_layer.cpp ./src/caffe/layers/cudnn_tanh_layer.cu