Medical-SAM2
Medical-SAM2 copied to clipboard
About the pos weight in BCE Loss.
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)