未验证 提交 c0cb9b02 编写于 作者: S shangliang Xu 提交者: GitHub

[PPYOLOE] fix loss bug in negative batch (#5774)

上级 b670dfbe
...@@ -293,7 +293,7 @@ class PPYOLOEHead(nn.Layer): ...@@ -293,7 +293,7 @@ class PPYOLOEHead(nn.Layer):
else: else:
loss_l1 = paddle.zeros([1]) loss_l1 = paddle.zeros([1])
loss_iou = 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 return loss_l1, loss_iou, loss_dfl
def get_loss(self, head_outs, gt_meta): def get_loss(self, head_outs, gt_meta):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册