caffe cudnn.hpp(114): error : too few arguments in function call

參考:https://zhuanlan.zhihu.com/p/37050387

我的環境:

VS2013 + cuda_9.0.176_win10.exe + cudnn-9.0-windows10-x64-v7.6.4.38.zip +

https://github.com/Microsoft/caffe

cudnn.hpp(114): error : too few arguments in function call

解決方法:

修改cudnn.hpp以下函數:

template <typename Dtype>
inline void setConvolutionDesc(cudnnConvolutionDescriptor_t* conv,
    cudnnTensorDescriptor_t bottom, cudnnFilterDescriptor_t filter,
    int pad_h, int pad_w, int stride_h, int stride_w) {
  CUDNN_CHECK(cudnnSetConvolution2dDescriptor(*conv,
      pad_h, pad_w, stride_h, stride_w, 1, 1, CUDNN_CROSS_CORRELATION));
}

改成:

template <typename Dtype>
inline void setConvolutionDesc(cudnnConvolutionDescriptor_t* conv,
    cudnnTensorDescriptor_t bottom, cudnnFilterDescriptor_t filter,
    int pad_h, int pad_w, int stride_h, int stride_w) {

#if CUDNN_VERSION_MIN(6, 0, 0)
	CUDNN_CHECK(cudnnSetConvolution2dDescriptor(*conv,
		pad_h, pad_w, stride_h, stride_w, 1, 1, CUDNN_CROSS_CORRELATION,
		dataType<Dtype>::type));
#else
	CUDNN_CHECK(cudnnSetConvolution2dDescriptor(*conv,
		pad_h, pad_w, stride_h, stride_w, 1, 1, CUDNN_CROSS_CORRELATION));
#endif
}

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章