Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error occurred when make resource code #140

Open
wangq95 opened this issue Sep 11, 2018 · 0 comments
Open

Error occurred when make resource code #140

wangq95 opened this issue Sep 11, 2018 · 0 comments

Comments

@wangq95
Copy link

wangq95 commented Sep 11, 2018

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(dist_sq_.cpu_data()[i]), Dtype(0.0));

Save and remake, the problem solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant