From cc15a9b6a9a240105614f2938924f609c108e421 Mon Sep 17 00:00:00 2001 From: wangguanzhong Date: Tue, 6 Dec 2022 17:17:06 +0800 Subject: [PATCH] fix gfl export model (#7462) --- ppdet/modeling/heads/gfl_head.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ppdet/modeling/heads/gfl_head.py b/ppdet/modeling/heads/gfl_head.py index 33a0db85a..66be77089 100644 --- a/ppdet/modeling/heads/gfl_head.py +++ b/ppdet/modeling/heads/gfl_head.py @@ -139,7 +139,7 @@ class DGQP(nn.Layer): axis=2, keepdim=True)], axis=2) else: stat = prob_topk - y = F.relu(self.reg_conv1(stat.reshape([N, -1, H, W]))) + y = F.relu(self.reg_conv1(stat.reshape([N, 4 * self.reg_topk, H, W]))) y = F.sigmoid(self.reg_conv2(y)) return y @@ -435,4 +435,4 @@ class GFLHead(nn.Layer): mlvl_scores = paddle.concat(cls_scores, axis=1) mlvl_scores = mlvl_scores.transpose([0, 2, 1]) bbox_pred, bbox_num, _ = self.nms(bboxes, mlvl_scores) - return bbox_pred, bbox_num \ No newline at end of file + return bbox_pred, bbox_num -- GitLab