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

Potential bug/issue in the loss function #8

Open
ksachdeva opened this issue Oct 25, 2019 · 0 comments
Open

Potential bug/issue in the loss function #8

ksachdeva opened this issue Oct 25, 2019 · 0 comments

Comments

@ksachdeva
Copy link

Hi,

Thanks for this great work. Your paper is well written as well.

Based on your paper & code my understanding is as follows -

a) You construct a batch such that you have 4 images per class and there could be n number of classes. In your paper you mentioned using n=64

b) You want to compare images of the same class and compute the MLS Score. In other words, it is incorrect to compare images from different class.

c) You make use masking features to ensure you achieve the step (b)

However, it seems that you would have duplicate comparisons amongst the images of the same class. For e.g.

Let's say you have images x1,x2,x3 & x4 for a class C and when comparing you should only take the values as a result of following
x1 - x2
x1 - x3
x1 - x4
x2 - x3
x2 - x4
x3 - x4

where as your code seem to doing -

x1 - x2
x1 - x3
x1 - x4
x2 - x1 <-- additional (same as x1 - x2 because you square them)
x2 - x3
x2 - x4
x3 - x1 <--- additional
x3 - x2 <---- additional
x3 - x4
x4 - x1 <-- additional
x4 - x2 <---- additional
x4 - x3 <---- additional

There is a chance that I have misunderstood the code so please feel free to correct me.

Thanks again for your great work

Regards
Kapil

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