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