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

Elaborate ni/ny #1

Open
DinSangrasi opened this issue Mar 8, 2022 · 1 comment
Open

Elaborate ni/ny #1

DinSangrasi opened this issue Mar 8, 2022 · 1 comment

Comments

@DinSangrasi
Copy link

Hi there, thanks for the nice work. Just wondering if you could resolve my confusion about ni/ny. In the paper it represents the margin from ground-truth class to negative class, however, in the code ni represents the samples of the negative class and ny represents the sum of samples of the whole dataset.
Moreover, could u also please define the context of the negative and positive classes.

@wutong16
Copy link
Owner

Hi @DinSangrasi! Sorry for the delayed reply.

We implement our loss here in the code following Eqn. (9), where the margin is defined here following Eqn. (8) and the bias is defined here. I guess maybe the ambiguity is introduced by the definition of bias where we include the sum of class, however, the first term of Eqn. (10) is deducted as below:
image
We introduce the sum of samples for normalization to avoid the bias being too large, and this implementation is still consistent with the theoretical formulation.

The positive classes denote the ground truth and the negative classes denote the others.

Hope this helps!

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

2 participants