From 12865d90fc22c4ea65921ea8a4607a1b454ed573 Mon Sep 17 00:00:00 2001 From: Guanghua Yu <742925032@qq.com> Date: Thu, 14 Apr 2022 12:23:42 +0800 Subject: [PATCH] fix Mask-RCNN QAT bug (#5689) --- ppdet/modeling/post_process.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ppdet/modeling/post_process.py b/ppdet/modeling/post_process.py index c64befa81..de450d2ae 100644 --- a/ppdet/modeling/post_process.py +++ b/ppdet/modeling/post_process.py @@ -33,7 +33,7 @@ __all__ = [ @register -class BBoxPostProcess(nn.Layer): +class BBoxPostProcess(object): __shared__ = ['num_classes', 'export_onnx'] __inject__ = ['decode', 'nms'] @@ -45,9 +45,9 @@ class BBoxPostProcess(nn.Layer): self.nms = nms self.export_onnx = export_onnx - def forward(self, head_out, rois, im_shape, scale_factor): + def __call__(self, head_out, rois, im_shape, scale_factor): """ - Decode the bbox and do NMS if needed. + Decode the bbox and do NMS if needed. Args: head_out (tuple): bbox_pred and cls_prob of bbox_head output. @@ -85,7 +85,7 @@ class BBoxPostProcess(nn.Layer): """ Rescale, clip and filter the bbox from the output of NMS to get final prediction. - + Notes: Currently only support bs = 1. -- GitLab