Skip to content

Line 87 typo #10

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

Open
BenDrewry opened this issue May 2, 2020 · 2 comments
Open

Line 87 typo #10

BenDrewry opened this issue May 2, 2020 · 2 comments

Comments

@BenDrewry
Copy link

original:
cb_loss = F.binary_cross_entropy_with_logits(input = logits,target = labels_one_hot, weights = weights)

update:
cb_loss = F.binary_cross_entropy_with_logits(input = logits,target = labels_one_hot, weight = weights)

  • pytorch optimizer takes keyword 'weight', not 'weights'

Thanks for the resource, it worked great!!

@Python-Eric
Copy link

wo ! useful , it did work !

@fcakyon
Copy link

fcakyon commented Dec 17, 2024

@BenDrewry @Python-Eric feel free to use this improved/fixed/battle-tested version, includes this fix ad much more: https://github.com/fcakyon/balanced-loss#improvements

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

3 participants