RstarCNN icon indicating copy to clipboard operation
RstarCNN copied to clipboard

Is it possible to build caffe-fast-rcnn without GPU?

Open Prithviraj7 opened this issue 9 years ago • 4 comments

I'm getting make errors when I run 'make all'.

Prithviraj7 avatar Mar 29 '16 12:03 Prithviraj7

You should be able to build it with the right changes in your makefile. Please refer to caffe for that...

gkioxari avatar Mar 30 '16 04:03 gkioxari

Hi! In makefile.config, I have already set the CPU_ONLY mode to 1 and WITH_PYTHON_LAYER to 1 as well. But still I am getting the following error when I run make all.

CXX src/caffe/layers/sigmoid_layer.cpp`

In file included from ./include/caffe/common.hpp:19:0,
                 from ./include/caffe/blob.hpp:8,
                 from ./include/caffe/layer.hpp:8,
                 from src/caffe/layers/sigmoid_cross_entropy_weighted_loss_layer.cpp:5:
./include/caffe/util/device_alternate.hpp:30:39: error: no ‘void caffe::SigmoidCrossEntropyWeightedLossLayer<Dtype>::Backward_gpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<bool>&, const std::vector<caffe::Blob<Dtype>*>&)’ member function declared in class ‘caffe::SigmoidCrossEntropyWeightedLossLayer<Dtype>’
     const vector<Blob<Dtype>*>& bottom) { NO_GPU; } \
                                       ^
src/caffe/layers/sigmoid_cross_entropy_weighted_loss_layer.cpp:87:1: note: in expansion of macro ‘STUB_GPU_BACKWARD’
 STUB_GPU_BACKWARD(SigmoidCrossEntropyWeightedLossLayer, Backward);
 ^
make: *** [.build_release/src/caffe/layers/sigmoid_cross_entropy_weighted_loss_layer.o] Error 1
make: *** Waiting for unfinished jobs....
src/caffe/layers/mil_layer.cpp: In instantiation of ‘void caffe::MILLayer<Dtype>::Forward_cpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = float]’:
src/caffe/layers/mil_layer.cpp:85:1:   required from here
src/caffe/layers/mil_layer.cpp:48:19: warning: unused variable ‘max_prob’ [-Wunused-variable]
       Dtype prob, max_prob; 
                   ^
src/caffe/layers/mil_layer.cpp: In instantiation of ‘void caffe::MILLayer<Dtype>::Forward_cpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = double]’:
src/caffe/layers/mil_layer.cpp:85:1:   required from here
src/caffe/layers/mil_layer.cpp:48:19: warning: unused variable ‘max_prob’ [-Wunused-variable]

I am already following all the instructions in Caffe's website. So, it would be great if you could help me with this issue.

TIA

Prithviraj7 avatar Mar 30 '16 04:03 Prithviraj7

I'm getting the same problem when trying make in CPU mode !

samouha avatar Apr 03 '16 13:04 samouha

In src/caffe/layers/sigmoid_cross_entropy_weighted_loss_layer.cpp try removing lines:

#ifdef CPU_ONLY STUB_GPU_BACKWARD(SigmoidCrossEntropyWeightedLossLayer, Backward); #endif

gkioxari avatar Apr 12 '16 05:04 gkioxari