未验证 提交 d30443c2 编写于 作者: W wangguanzhong 提交者: GitHub

update_ttfnet_release0.5 (#1715)

上级 dd077f96
...@@ -348,8 +348,7 @@ class TTFHead(object): ...@@ -348,8 +348,7 @@ class TTFHead(object):
return pred, target, weight return pred, target, weight
def get_loss(self, pred_hm, pred_wh, target_hm, box_target, target_weight): def get_loss(self, pred_hm, pred_wh, target_hm, box_target, target_weight):
pred_hm = paddle.tensor.clamp( pred_hm = paddle.clip(fluid.layers.sigmoid(pred_hm), 1e-4, 1 - 1e-4)
fluid.layers.sigmoid(pred_hm), 1e-4, 1 - 1e-4)
hm_loss = self.ct_focal_loss(pred_hm, target_hm) * self.hm_weight hm_loss = self.ct_focal_loss(pred_hm, target_hm) * self.hm_weight
shape = fluid.layers.shape(target_hm) shape = fluid.layers.shape(target_hm)
shape.stop_gradient = True shape.stop_gradient = True
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册