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

Regarding class weights in bce loss function #7

Open
puneeshkhanna opened this issue May 3, 2022 · 0 comments
Open

Regarding class weights in bce loss function #7

puneeshkhanna opened this issue May 3, 2022 · 0 comments

Comments

@puneeshkhanna
Copy link

weight=torch.FloatTensor([0.2, 0.2, 0.3, 0.3]

Above parameter is corresponding to inputs in a batch.

To handle class imbalance, I think the parameter is pos_weight and not weight.

https://pytorch.org/docs/stable/generated/torch.nn.BCEWithLogitsLoss.html?highlight=bcewithlogitsloss#torch.nn.BCEWithLogitsLoss

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