caffe-mobilenet icon indicating copy to clipboard operation
caffe-mobilenet copied to clipboard

hpp/cpp/cu files compile error

Open leochli opened this issue 7 years ago • 11 comments

Hi @farmingyard , I am new to caffe. I got an error saying like "class caffe::ConvolutionParameter’ has no member named ‘kernel_size_size’" in conv_dw_layer.cpp when I'm trying to compile.

Any idea of this error?

FYI, I put the hpp file in caffe_root/inclide/caffe and caffe_root/inclide/caffe/layers. The cu and cpp files in caffe_root/src/caffe/layers. I cannot define it in caffe.proto because there's already a ConvolutionParameter option existing.

thanks!

leochli avatar Jul 19 '17 01:07 leochli

Hi @leolee96 , You have no need to change proto file, because conv_dw layer use conv's ConvolutionParameter. In the normal case, follow your action you can build successfully, I want to know that, can you build successfully before you adding these files?

farmingyard avatar Jul 19 '17 02:07 farmingyard

Hi @farmingyard ,

I can build successfully without these files.

A piece of the error reads like: /src/caffe/layers/conv_dw_layer.cpp: In member function ‘virtual void caffe::ConvolutionDepthwiseLayer<Dtype>::LayerSetUp(const std::vector<caffe::Blob<Dtype>>&, const std::vector<caffe::Blob<Dtype>>&)’: /src/caffe/layers/conv_dw_layer.cpp:16:20: error: ‘class caffe::ConvolutionParameter’ has no member named ‘kernel_size_size’ if (conv_param.kernel_size_size() == 1) ^ /src/caffe/layers/conv_dw_layer.cpp:18:43: error: no matching function for call to ‘caffe::ConvolutionParameter::kernel_size(int)’ kernel_h_ = conv_param.kernel_size(0); ^

thanks!

leochli avatar Jul 19 '17 02:07 leochli

@leolee96 Can you show me your caffe version or URL?

farmingyard avatar Jul 19 '17 03:07 farmingyard

Hi @farmingyard , I have solved the problem. My caffe version is too old. I can compile the new layer after I update. thanks a million!

leochli avatar Jul 19 '17 03:07 leochli

@leolee96 Good job!

farmingyard avatar Jul 19 '17 04:07 farmingyard

@leolee96 hi, i have trained a new model with the ConvolutionDepthwise layer you have provided, but the train time or inference time are pretty slow , i don't know what is the problem?

defenceVT avatar Aug 01 '17 14:08 defenceVT

hi, @farmingyard , I am trying to compile it with caffe and it shows the error "‘caffe_gpu_set’ was not declared in this scope" in conv_dw_layer.cpp. Any suggestions to solve the problem? Thx

GallonDeng avatar Nov 14 '17 08:11 GallonDeng

compile without GPU

GallonDeng avatar Nov 14 '17 08:11 GallonDeng

@AllenDun The problem solved ? I meet the same problem.

ElbertLi avatar Apr 11 '18 05:04 ElbertLi

@ElbertLi @AllenDun seeissues12

jnulzl avatar May 09 '18 06:05 jnulzl

compile without GPU

have u solved this issue

ZPL95 avatar Aug 29 '19 02:08 ZPL95