From 6eed850e4b4eee6a99bffbfd336b8e2aaf6ae30b Mon Sep 17 00:00:00 2001 From: Wenyu Date: Thu, 8 Jul 2021 17:23:01 +0800 Subject: [PATCH] update (#3638) --- ppdet/modeling/heads/sparsercnn_head.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ppdet/modeling/heads/sparsercnn_head.py b/ppdet/modeling/heads/sparsercnn_head.py index 9e26f092d..30270b6ec 100644 --- a/ppdet/modeling/heads/sparsercnn_head.py +++ b/ppdet/modeling/heads/sparsercnn_head.py @@ -21,10 +21,10 @@ import copy import paddle import paddle.nn as nn -import ppdet.modeling.initializer as init from ppdet.core.workspace import register from ppdet.modeling.heads.roi_extractor import RoIAlign from ppdet.modeling.bbox_utils import delta2bbox +from .. import initializer as init _DEFAULT_SCALE_CLAMP = math.log(100000. / 16) @@ -366,6 +366,5 @@ class SparseRCNNHead(nn.Layer): def box_cxcywh_to_xyxy(x): x_c, y_c, w, h = x.unbind(-1) - b = [(x_c - 0.5 * w), (y_c - 0.5 * h), - (x_c + 0.5 * w), (y_c + 0.5 * h)] - return paddle.stack(b, axis=-1) \ No newline at end of file + b = [(x_c - 0.5 * w), (y_c - 0.5 * h), (x_c + 0.5 * w), (y_c + 0.5 * h)] + return paddle.stack(b, axis=-1) -- GitLab