[Fix] Fix `loss_weight` in `LabelSmoothLoss`. (#1058)
parent
51b7c754e7
commit
8c5d86a388
|
@ -162,7 +162,7 @@ class LabelSmoothLoss(nn.Module):
|
|||
f'and target.shape: {one_hot_like_label.shape}'
|
||||
|
||||
smoothed_label = self.smooth_label(one_hot_like_label)
|
||||
return self.ce.forward(
|
||||
return self.loss_weight * self.ce.forward(
|
||||
cls_score,
|
||||
smoothed_label,
|
||||
weight=weight,
|
||||
|
|
Loading…
Reference in New Issue