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

Source on BalancedBCEWithLogitsLoss #65

Closed
davidhuangal opened this issue Sep 27, 2021 · 5 comments
Closed

Source on BalancedBCEWithLogitsLoss #65

davidhuangal opened this issue Sep 27, 2021 · 5 comments

Comments

@davidhuangal
Copy link

I was wondering if there is a paper or even just a description on the BalancedBCEWithLogitsLoss ?

@BloodAxe
Copy link
Owner

Hi! Indeed, there are. See https://arxiv.org/pdf/1504.06375.pdf formula 2.
Will update the code for the future release with proper docs.

@davidhuangal
Copy link
Author

Thank you very much!

@davidhuangal
Copy link
Author

davidhuangal commented Sep 27, 2021

I have two more questions about this loss function: what does the parameter gamma correspond with in formula 2 since there isn't a gamma symbol in it, and how does it effect the loss?

@BloodAxe
Copy link
Owner

The gamma is a my addition to this loss, when gamma=1, it's equal to vanilla BBCE as in Formula 2. Values >1 decay the balancing weights. E.g if gamma = 2, and positives fraction is 0.25 and negatives is 0.75, corresponding weights will be 0.25^2 and 0.75^ accordingly.

@davidhuangal
Copy link
Author

Got it, that makes sense. Thank you again.

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