From d30443c2b3c4a29174c7047cb09e701060019729 Mon Sep 17 00:00:00 2001 From: wangguanzhong Date: Thu, 19 Nov 2020 11:29:20 +0800 Subject: [PATCH] update_ttfnet_release0.5 (#1715) --- ppdet/modeling/anchor_heads/ttf_head.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ppdet/modeling/anchor_heads/ttf_head.py b/ppdet/modeling/anchor_heads/ttf_head.py index df50ca2d1..8640b3f48 100644 --- a/ppdet/modeling/anchor_heads/ttf_head.py +++ b/ppdet/modeling/anchor_heads/ttf_head.py @@ -348,8 +348,7 @@ class TTFHead(object): return pred, target, weight def get_loss(self, pred_hm, pred_wh, target_hm, box_target, target_weight): - pred_hm = paddle.tensor.clamp( - fluid.layers.sigmoid(pred_hm), 1e-4, 1 - 1e-4) + pred_hm = paddle.clip(fluid.layers.sigmoid(pred_hm), 1e-4, 1 - 1e-4) hm_loss = self.ct_focal_loss(pred_hm, target_hm) * self.hm_weight shape = fluid.layers.shape(target_hm) shape.stop_gradient = True -- GitLab