conner99 / caffe

Caffe: a fast open framework for deep learning.
http://caffe.berkeleyvision.org/
Other
72 stars 38 forks source link

Error when compiling bbox_utils.cpp #43

Closed SingL3 closed 1 year ago

SingL3 commented 6 years ago

Hello! I am trying to compile caffe-ssd in windows with VS 2015, I am now very close to success. However, an error occurred when compling bbox_utils.cpp. https://github.com/conner99/caffe/blob/ssd-microsoft/src/caffe/util/bbox_util.cpp First, there is a waring in xmemory0 that says: C:\Program Files\Microsoft Visual Studio 14.0\VC\Include\xmemory0(737): warning C4244: ‘initializetion’: : conversion from 'const double' to 'float', possible loss of data and then it raises several error like this: C:\Program Files\Microsoft Visual Studio 14.0\VC\Include\xmemory0(857): note: see reference to class template instantiation 'void std::allocator<Ty_>::construct<_Objty, const Dtype&>(_Objty, const Dtype&)' being compiled with{ _Ty=float, _Objty=float, Dtype=double } and I try to locate the code that raise this error. After I try to comment the code that contains 'const double', and uncomment them one by one. I find the problem. It is the explicit initialization at line 683-685 that results in this problem. And I think it is line 663-666 that actually is the problem. https://github.com/conner99/caffe/blob/d74596188fc6e529165f905a75211020a9d59ce0/src/caffe/util/bbox_util.cpp#L663-L666 I am wondering is there any solution to this problem?