sigmoid focal loss
pikerbright opened this issue · 1 comments
pikerbright commented
@yqyao sigmoid focal loss implement seems not right.
origin code:
loss_neg = -1. * torch.pow(1 - P, self.gamma) * torch.log(1 - P) * (
1 - targets) * (1 - alpha_mask)
but according to paper, I think it should be:
loss_neg = -1. * torch.pow(P, self.gamma) * torch.log(1 - P) * (
1 - targets) * (1 - alpha_mask)
@yqyao Please help to confirm it.
Thank you very much~
yqyao commented
Yes, you are right. Thank you very much. @pikerbright