未验证 提交 64687d46 编写于 作者: G Guanghua Yu 提交者: GitHub

fix yolov3 last conv quantization (#6813)

上级 cd8671e5
......@@ -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]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册