CTPN
CTPN copied to clipboard
error: no matching function for call to
When I tried to make -j, it reports the same error all the time. I have tried to downgrade gcc to 4 or 5, but it's not working. I have no idea what's going on...
CXX src/caffe/layers/contrastive_loss_layer.cpp src/caffe/layers/contrastive_loss_layer.cpp:56:22: error: no matching function for call to 'max' Dtype dist = std::max(margin - sqrt(dist_sq_.cpu_data()[i]), 0.0); ^~~~~~~~ src/caffe/layers/contrastive_loss_layer.cpp:118:19: note: in instantiation of member function 'caffe::ContrastiveLossLayer<float>::Forward_cpu' requested here INSTANTIATE_CLASS(ContrastiveLossLayer); ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:2611:1: note: candidate template ignored: deduced conflicting types for parameter '_Tp' ('float' vs. 'double') max(const _Tp& __a, const _Tp& __b) ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:2603:1: note: candidate function template not viable: requires 3 arguments, but 2 were provided max(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ 1 error generated. make: *** [.build_release/src/caffe/layers/contrastive_loss_layer.o] Error 1
Anyone with any ideas?
Hi, I meet the same error. Have you fix it? Can you tell me how? thx
std::max(margin - sqrt(dist_sq_.cpu_data()[i]), 0.0); ---> std::max(margin - sqrt(dist_sq_.cpu_data()[i]), Dtype(0.0));