From 64687d4639989be5b017d97aa9620c264bd86bea Mon Sep 17 00:00:00 2001 From: Guanghua Yu <742925032@qq.com> Date: Wed, 31 Aug 2022 17:46:41 +0800 Subject: [PATCH] fix yolov3 last conv quantization (#6813) --- ppdet/modeling/heads/yolo_head.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ppdet/modeling/heads/yolo_head.py b/ppdet/modeling/heads/yolo_head.py index 0a63060d0..4f794528d 100644 --- a/ppdet/modeling/heads/yolo_head.py +++ b/ppdet/modeling/heads/yolo_head.py @@ -78,7 +78,7 @@ class YOLOv3Head(nn.Layer): self.num_outputs = len(self.anchors) self.data_format = data_format - self.yolo_outputs = [] + self.yolo_outputs = nn.LayerList() for i in range(len(self.anchors)): if self.iou_aware: @@ -94,9 +94,7 @@ class YOLOv3Head(nn.Layer): padding=0, data_format=data_format, bias_attr=ParamAttr(regularizer=L2Decay(0.))) - conv.skip_quant = True - yolo_output = self.add_sublayer(name, conv) - self.yolo_outputs.append(yolo_output) + self.yolo_outputs.append(conv) def parse_anchor(self, anchors, anchor_masks): self.anchors = [[anchors[i] for i in mask] for mask in anchor_masks] -- GitLab