Error information:
In instantiation of ‘void caffe::ContrastiveLossLayer::Forward_cpu(const std::vector<caffe::Blob>&, const std::vector<caffe::Blob>&) [with Dtype = float]’
Open src/caffe/layers/contrastive_loss_layer.cpp
Replace the 56th line with:
Dtype dist = std::max(margin - (float)sqrt(distsq.cpu_data()[i]), Dtype(0.0));
Error information: In instantiation of ‘void caffe::ContrastiveLossLayer::Forward_cpu(const std::vector<caffe::Blob>&, const std::vector<caffe::Blob >&) [with Dtype = float]’
Open src/caffe/layers/contrastive_loss_layer.cpp Replace the 56th line with: Dtype dist = std::max(margin - (float)sqrt(distsq.cpu_data()[i]), Dtype(0.0));
Save and remake, the problem solved.