happynear / happynear/caffe-windows

contrastive_loss_layer.hpp may have a problem

Open
#203 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.3k
Forks
637
PR merge metrics
No merged PRs in 30d

Description

When I used the contrastive_loss_layer for deepid2,

I met a strange failure:

F0504 15:43:11.065735 22324 layer.hpp:375] Check failed: ExactNumBottomBlobs() == bottom.size() (4 vs. 3) ContrastiveLoss Layer takes 4 bottom blob(s) as input.

So I check the bvlc/caffe code and compare the code with happynear_version.

Surprisingly, I find the contrastive_loss_layer in bvlc_version is different from the happynear_version

contrastive_loss_layer.hpp:

virtual inline int ExactNumBottomBlobs() const { return 3; } (bvlc)
virtual inline int ExactNumBottomBlobs() const { return 4; } (happynear)

It means that h_version need one more input, which makes me really confused.

Besides, I check the contrastive_loss_layer.cu and contrastive_loss_layer.cpp.
Both of them just used 3 bottom as input.

So I wonder if it is a mistake or some special stuff.

Hope Mr.Happynear could take a little bit of your precious time to answer my question.
Thanks a lot!
Have a good day!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.