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

About the pos weight in BCE Loss. #78

Open
Yaostars opened this issue Dec 27, 2024 · 0 comments
Open

About the pos weight in BCE Loss. #78

Yaostars opened this issue Dec 27, 2024 · 0 comments

Comments

@Yaostars
Copy link

As a new learner, I wonder about the pos weight you use in your bce loss. Does "*2" have a special influence? Thank you very much.

pos_weight = torch.ones([1]).cuda(device=device)*2
criterions = nn.ModuleList([nn.BCEWithLogitsLoss(pos_weight=pos_weight), nn.L1Loss(), SCRLoss(), HCRLoss()]).to(device)

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