From 4411a54d55187602628c62ca5fe5d3141c57e170 Mon Sep 17 00:00:00 2001 From: rock4you Date: Mon, 27 Jul 2020 11:13:43 +0800 Subject: [PATCH] Update iou_loss.py --- ppdet/modeling/losses/iou_loss.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ppdet/modeling/losses/iou_loss.py b/ppdet/modeling/losses/iou_loss.py index 56532c868..eb0e7112b 100644 --- a/ppdet/modeling/losses/iou_loss.py +++ b/ppdet/modeling/losses/iou_loss.py @@ -176,9 +176,9 @@ class IouLoss(object): grid_y_act.stop_gradient = True if is_gt: cx = fluid.layers.elementwise_add(dcx, gi) / grid_x_act - cx.gradient = True + cx.stop_gradient = True cy = fluid.layers.elementwise_add(dcy, gj) / grid_y_act - cy.gradient = True + cy.stop_gradient = True else: dcx_sig = fluid.layers.sigmoid(dcx) dcy_sig = fluid.layers.sigmoid(dcy) -- GitLab