happynear / caffe-windows

Configure Caffe in one hour for Windows users.
Other
1.32k stars 650 forks source link

label_specific_add error #296

Open taoyunuo opened 5 years ago

taoyunuo commented 5 years ago

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::Reshape(const std::vector<caffe::Blob>&, const std::vector<caffe::Blob>&) [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

olojuwin commented 5 years ago

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

happynear commented 5 years ago

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

olojuwin commented 5 years ago

thanks

At 2018-08-20 10:59:46, "Feng Wang" notifications@github.com 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.