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

label_specific_add error

Open taoyunuo opened this issue 6 years ago • 3 comments

src/caffe/layers/label_specific_add.cpp:28:7: error: converting to ‘const std::vector’ from initializer list would use explicit constructor ‘std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>::size_type, const value_type&, const allocator_type&) [with _Tp = int; _Alloc = std::allocator; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::value_type = int; std::vector<_Tp, _Alloc>::allocator_type = std::allocator]’ src/caffe/layers/label_specific_add.cpp: In instantiation of ‘void caffe::LabelSpecificAddLayer<Dtype>::Reshape(const std::vector<caffe::Blob<Dtype>>&, const std::vector<caffe::Blob<Dtype>>&) [with Dtype = double]’: src/caffe/layers/label_specific_add.cpp:80:1: required from here src/caffe/layers/label_specific_add.cpp:28:7: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 src/caffe/layers/label_specific_add.cpp:28:7: error: converting to ‘const std::vector’ from initializer list would use explicit constructor ‘std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>::size_type, const value_type&, const allocator_type&) [with _Tp = int; _Alloc = std::allocator; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::value_type = int; std::vector<_Tp, _Alloc>::allocator_type = std::allocator]’ Makefile:575: recipe for target '.build_release/src/caffe/layers/label_specific_add.o' failed make: *** [.build_release/src/caffe/layers/label_specific_add.o] Error 1

taoyunuo avatar Aug 10 '18 03:08 taoyunuo

I have got this 。You may get help : "if (top.size() == 2) top[1]->Reshape(vector 《int》 (1));

olojuwin avatar Aug 16 '18 03:08 olojuwin

I used many C++11 features. Use this Makefile to make your project: https://github.com/happynear/caffe-windows/blob/ms/Makefile

happynear avatar Aug 20 '18 02:08 happynear

thanks

At 2018-08-20 10:59:46, "Feng Wang" [email protected] wrote:

I used many C++11 features. Use this Makefile to make your project: https://github.com/happynear/caffe-windows/blob/ms/Makefile

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

olojuwin avatar Sep 20 '18 08:09 olojuwin