textspotter icon indicating copy to clipboard operation
textspotter copied to clipboard

Cannot make caffe version due to reverse_axis_layer error

Open AndresPMD opened this issue 7 years ago • 5 comments

Hello @tonghe90 , At the moment it is impossible to compile your caffe version due to the following error:

CXX src/caffe/layers/base_conv_layer.cpp In file included from ./include/caffe/common.hpp:19:0, from ./include/caffe/blob.hpp:8, from ./include/caffe/layers/reverse_axis_layer.hpp:6, from src/caffe/layers/reverse_axis_layer.cpp:1: ./include/caffe/util/device_alternate.hpp:14:15: error: expected initializer before ‘<’ token void classname<Dtype>::Forward_gpu(const vector<Blob<Dtype>>& bottom,
^ src/caffe/layers/reverse_axis_layer.cpp:61:1: note: in expansion of macro ‘STUB_GPU’ STUB_GPU(ReverseLayer); ^ ./include/caffe/util/device_alternate.hpp:17:15: error: expected initializer before ‘<’ token void classname<Dtype>::Backward_gpu(const vector<Blob<Dtype>
>& top,
^ src/caffe/layers/reverse_axis_layer.cpp:61:1: note: in expansion of macro ‘STUB_GPU’ STUB_GPU(ReverseLayer); ^ Makefile:581: recipe for target '.build_release/src/caffe/layers/reverse_axis_layer.o' failed make: *** [.build_release/src/caffe/layers/reverse_axis_layer.o] Error 1 make: *** Waiting for unfinished jobs....

Do you have any idea why is this happening? I am configuring the Makefile.config to run in a CPU rather than GPU. Let me know any comments. Thank you!

AndresPMD avatar Nov 06 '18 17:11 AndresPMD

@DreadPiratePsyopus, Thanks for your interest. I have rebuild it but can't replicate this error. I think you can have a try to use CPU version of this layer.

tonghe90 avatar Nov 07 '18 00:11 tonghe90

I have tried on different computers (different versions of cuda and cudnn) but I am not able to rebuild the project. I already tried with CPU and GPU and the same error on reverse_axis_layer persists. Any idea what could be happening? Do you have a specific guide to build your custom caffe? I am following this tutorial https://github.com/BVLC/caffe/wiki/Ubuntu-16.04-Installation-Guide along with the official caffe tutorial.

AndresPMD avatar Nov 07 '18 00:11 AndresPMD

same problem, also waiting for your solution, thanks!

etworker avatar Nov 18 '18 16:11 etworker

I managed to make this code work, but most of the problems I encountered were solved when I used Cuda 8.0 and CUDNN 6.0.

AndresPMD avatar Nov 19 '18 11:11 AndresPMD

Changing STUB_CPU(ReverseLayer) to STUB_CPU(ReverseAxisLayer) seems to solve the problem for me

Bshowg avatar Dec 14 '18 12:12 Bshowg