caffe-segnet icon indicating copy to clipboard operation
caffe-segnet copied to clipboard

Error occurred when make resource code

Open wangq95 opened this issue 6 years ago • 0 comments

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.

wangq95 avatar Sep 11 '18 12:09 wangq95