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

fix fcos (#2354)

上级 8480af2a
...@@ -197,10 +197,9 @@ class FCOSLoss(object): ...@@ -197,10 +197,9 @@ class FCOSLoss(object):
reg_loss = fluid.layers.elementwise_mul( reg_loss = fluid.layers.elementwise_mul(
reg_loss, mask_positive_float, axis=0) / normalize_sum reg_loss, mask_positive_float, axis=0) / normalize_sum
ctn_loss = fluid.layers.sigmoid_cross_entropy_with_logits( ctn_loss = fluid.layers.sigmoid_cross_entropy_with_logits(
x=centerness_flatten, x=centerness_flatten, label=tag_center_flatten)
label=tag_center_flatten) * mask_positive_float / num_positive_fp32
ctn_loss = fluid.layers.elementwise_mul( ctn_loss = fluid.layers.elementwise_mul(
ctn_loss, mask_positive_float, axis=0) / normalize_sum ctn_loss, mask_positive_float, axis=0) / num_positive_fp32
loss_all = { loss_all = {
"loss_centerness": fluid.layers.reduce_sum(ctn_loss), "loss_centerness": fluid.layers.reduce_sum(ctn_loss),
"loss_cls": fluid.layers.reduce_sum(cls_loss), "loss_cls": fluid.layers.reduce_sum(cls_loss),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册