error: too few arguments in function call

6826 단어 caffe
최근에 caffe가 오류를 보고했습니다. 제 cudnn 버전(cuDNN:ver.7.0.5)입니다. 그리고 caffe에서 cudnn 버전이 너무 낮아서 오류가 발생했습니다.
CMake Error at cuda_compile_1_generated_bias_layer.cu.o.Release.cmake:279 (message):
  Error generating file
  /home/fuxueping/sdb/Caffe_Project_Train/caffe-yolo9000_k_means_Region_box/build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_bias_layer.cu.o


make[2]: *** [src/caffe/CMakeFiles/caffe.dir/build.make:2573:src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_bias_layer.cu.o]   1
make[2]: ***  ....
/home/fuxueping/sdb/Caffe_Project_Train/caffe-yolo9000_k_means_Region_box/include/caffe/util/cudnn.hpp(112): error: too few arguments in function call

1 error detected in the compilation of "/tmp/tmpxft_00007e65_00000000-4_batch_reindex_layer.cpp4.ii".
/home/fuxueping/sdb/Caffe_Project_Train/caffe-yolo9000_k_means_Region_box/include/caffe/util/cudnn.hpp(112): error: too few arguments in function call

CMake Error at cuda_compile_1_generated_batch_reindex_layer.cu.o.Release.cmake:279 (message):
  Error generating file
  /home/fuxueping/sdb/Caffe_Project_Train/caffe-yolo9000_k_means_Region_box/build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_batch_reindex_layer.cu.o


make[2]: *** [src/caffe/CMakeFiles/caffe.dir/build.make:2071:src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_batch_reindex_layer.cu.o]   1
1 error detected in the compilation of "/tmp/tmpxft_00007e75_00000000-4_absval_layer.cpp4.ii".
CMake Error at cuda_compile_1_generated_absval_layer.cu.o.Release.cmake:279 (message):
  Error generating file
  /home/fuxueping/sdb/Caffe_Project_Train/caffe-yolo9000_k_means_Region_box/build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_absval_layer.cu.o


make[2]: *** [src/caffe/CMakeFiles/caffe.dir/build.make:560:src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_absval_layer.cu.o]   1
/home/fuxueping/sdb/Caffe_Project_Train/caffe-yolo9000_k_means_Region_box/include/caffe/util/cudnn.hpp(112): error: too few arguments in function call

1 error detected in the compilation of "/tmp/tmpxft_00007e90_00000000-4_contrastive_loss_layer.cpp4.ii".
CMake Error at cuda_compile_1_generated_contrastive_loss_layer.cu.o.Release.cmake:279 (message):
  Error generating file
  /home/fuxueping/sdb/Caffe_Project_Train/caffe-yolo9000_k_means_Region_box/build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_contrastive_loss_layer.cu.o


make[2]: *** [src/caffe/CMakeFiles/caffe.dir/build.make:3583:src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_contrastive_loss_layer.cu.o]   1
/home/fuxueping/sdb/Caffe_Project_Train/caffe-yolo9000_k_means_Region_box/include/caffe/util/cudnn.hpp(112): error: too few arguments in function call

/home/fuxueping/sdb/Caffe_Project_Train/caffe-yolo9000_k_means_Region_box/include/caffe/util/cudnn.hpp(112): error: too few arguments in function call

1 error detected in the compilation of "/tmp/tmpxft_00007e88_00000000-4_batch_norm_layer.cpp4.ii".
/home/fuxueping/sdb/Caffe_Project_Train/caffe-yolo9000_k_means_Region_box/include/caffe/util/cudnn.hpp(112): error: too few arguments in function call

CMake Error at cuda_compile_1_generated_batch_norm_layer.cu.o.Release.cmake:279 (message):
  Error generating file
  /home/fuxueping/sdb/Caffe_Project_Train/caffe-yolo9000_k_means_Region_box/build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_batch_norm_layer.cu.o


make[2]: *** [src/caffe/CMakeFiles/caffe.dir/build.make:1570:src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_batch_norm_layer.cu.o]   1
1 error detected in the compilation of "/tmp/tmpxft_00007e73_00000000-4_base_data_layer.cpp4.ii".
CMake Error at cuda_compile_1_generated_base_data_layer.cu.o.Release.cmake:279 (message):
  Error generating file
  /home/fuxueping/sdb/Caffe_Project_Train/caffe-yolo9000_k_means_Region_box/build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_base_data_layer.cu.o


make[2]: *** [src/caffe/CMakeFiles/caffe.dir/build.make:1069:src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_base_data_layer.cu.o]   1
1 error detected in the compilation of "/tmp/tmpxft_00007e5f_00000000-4_bnll_layer.cpp4.ii".
CMake Error at cuda_compile_1_generated_bnll_layer.cu.o.Release.cmake:279 (message):
  Error generating file
  /home/fuxueping/sdb/Caffe_Project_Train/caffe-yolo9000_k_means_Region_box/build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_bnll_layer.cu.o


make[2]: *** [src/caffe/CMakeFiles/caffe.dir/build.make:3075:src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_bnll_layer.cu.o]   1
/home/fuxueping/sdb/Caffe_Project_Train/caffe-yolo9000_k_means_Region_box/include/caffe/util/cudnn.hpp(112): error: too few arguments in function call

1 error detected in the compilation of "/tmp/tmpxft_00007e81_00000000-4_concat_layer.cpp4.ii".
CMake Error at cuda_compile_1_generated_concat_layer.cu.o.Release.cmake:279 (message):
  Error generating file
  /home/fuxueping/sdb/Caffe_Project_Train/caffe-yolo9000_k_means_Region_box/build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_concat_layer.cu.o


make[2]: *** [src/caffe/CMakeFiles/caffe.dir/build.make:3576:src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_concat_layer.cu.o]   1
make[1]: *** [CMakeFiles/Makefile2:235:src/caffe/CMakeFiles/caffe.dir/all]   2

해결 방법:
장:
template 
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 
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));
#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::type));
#else
  CUDNN_CHECK(cudnnSetConvolution2dDescriptor(*conv,
      pad_h, pad_w, stride_h, stride_w, 1, 1, CUDNN_CROSS_CORRELATION));
#endif
}

전재:https://blog.csdn.net/mao_hui_fei/article/details/80326464

좋은 웹페이지 즐겨찾기