diff --git a/ppdet/modeling/heads/ppyoloe_head.py b/ppdet/modeling/heads/ppyoloe_head.py index 01d7e91745622aec98544fdc89ff37367e0d67a3..70d93f2e1b7f4c8caf604ff88596e96bc2d08303 100644 --- a/ppdet/modeling/heads/ppyoloe_head.py +++ b/ppdet/modeling/heads/ppyoloe_head.py @@ -293,7 +293,7 @@ class PPYOLOEHead(nn.Layer): else: loss_l1 = paddle.zeros([1]) loss_iou = paddle.zeros([1]) - loss_dfl = paddle.zeros([1]) + loss_dfl = pred_dist.sum() * 0. return loss_l1, loss_iou, loss_dfl def get_loss(self, head_outs, gt_meta):