CTPN icon indicating copy to clipboard operation
CTPN copied to clipboard

make error

Open txacuhan opened this issue 7 years ago • 5 comments

In file included from ./include/caffe/common.hpp:19:0, from src/caffe/layers/more_sparse_im2col_layer.cpp:3: ./include/caffe/util/device_alternate.hpp:15:36: error: no ‘void caffe::MoreSparseIm2colLayer<Dtype>::Forward_gpu(const std::vector<caffe::Blob<Dtype>>&, const std::vector<caffe::Blob<Dtype>>&)’ member function declared in class ‘caffe::MoreSparseIm2colLayer<Dtype>’ const vector<Blob<Dtype>>& top) { NO_GPU; }
^ src/caffe/layers/more_sparse_im2col_layer.cpp:89:1: note: in expansion of macro ‘STUB_GPU’ STUB_GPU(MoreSparseIm2colLayer); ^ ./include/caffe/util/device_alternate.hpp:19:39: error: no ‘void caffe::MoreSparseIm2colLayer<Dtype>::Backward_gpu(const std::vector<caffe::Blob<Dtype>
>&, const std::vector&, const std::vector<caffe::Blob<Dtype>>&)’ member function declared in class ‘caffe::MoreSparseIm2colLayer<Dtype>’ const vector<Blob<Dtype>>& bottom) { NO_GPU; }
^ src/caffe/layers/more_sparse_im2col_layer.cpp:89:1: note: in expansion of macro ‘STUB_GPU’ STUB_GPU(MoreSparseIm2colLayer); ^ Makefile:518: recipe for target '.build_release/src/caffe/layers/more_sparse_im2col_layer.o' failed make: *** [.build_release/src/caffe/layers/more_sparse_im2col_layer.o] Error 1

Any help would be appreciated. I am compiling this on Ubuntu 16.04 without cudnn

Thanks so much

txacuhan avatar Dec 24 '16 09:12 txacuhan

@txacuhan The errors happened because the program didn't support the CPU only mode then. We've updated it and it supports CPU only mode now. Please download it again. Thank you:-).

tianzhi0549 avatar Dec 25 '16 07:12 tianzhi0549

@tianzhi0549 Thanks

txacuhan avatar Dec 26 '16 02:12 txacuhan

@tianzhi0549 hi The errors happened again on OX 10.12.

CXX src/caffe/blob.cpp CXX src/caffe/data_reader.cpp CXX src/caffe/data_transformer.cpp CXX src/caffe/internal_thread.cpp CXX src/caffe/layer.cpp CXX src/caffe/layer_factory.cpp In file included from src/caffe/layer_factory.cpp:11: In file included from ./include/caffe/vision_layers.hpp:10: In file included from ./include/caffe/common_layers.hpp:12: ./include/caffe/loss_layers.hpp:13:10: fatal error: 'tr1/unordered_map' file not found #include <tr1/unordered_map> ^ 1 error generated. make: *** [.build_release/src/caffe/layer_factory.o] Error 1

Thank you very much

txacuhan avatar Mar 03 '17 09:03 txacuhan

go to the loss_layers.hpp and change tr1/unordered_map with unordered_map and remove the ::t r:: also

HamdiHamed1992 avatar Mar 24 '17 13:03 HamdiHamed1992

@HamdiHamed1992 我在我的macbookpro上编译通过,你说的方法好使。

//#include <tr1/unordered_map>
#include <unordered_map>
... ...
//typedef std::tr1::unordered_map<int, vector<int> > tmap;
    typedef std::unordered_map<int, vector<int> > tmap;

ZhangXinNan avatar May 11 '17 05:05 ZhangXinNan