gkioxari / RstarCNN

R*CNN
Other
132 stars 53 forks source link

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

Open Prithviraj7 opened 8 years ago

Prithviraj7 commented 8 years ago

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

gkioxari commented 8 years ago

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

Prithviraj7 commented 8 years ago

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

samouha commented 8 years ago

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

gkioxari commented 8 years ago

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

`#ifdef CPU_ONLY STUB_GPU_BACKWARD(SigmoidCrossEntropyWeightedLossLayer, Backward);

endif`