From afdf3c3f84d9fc5d10ff777eb17b45772ceba558 Mon Sep 17 00:00:00 2001 From: dengkaipeng Date: Tue, 5 Mar 2019 21:39:23 +0800 Subject: [PATCH] fix doc.test=develop --- paddle/fluid/operators/detection/yolov3_loss_op.cc | 4 ++-- python/paddle/fluid/layers/detection.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/paddle/fluid/operators/detection/yolov3_loss_op.cc b/paddle/fluid/operators/detection/yolov3_loss_op.cc index 2dbe46de0..f4a6a68cd 100644 --- a/paddle/fluid/operators/detection/yolov3_loss_op.cc +++ b/paddle/fluid/operators/detection/yolov3_loss_op.cc @@ -227,8 +227,8 @@ class Yolov3LossOpMaker : public framework::OpProtoAndCheckerMaker { While :attr:`use_label_smooth` is set to be :attr:`True`, the classification target will be smoothed when calculating classification loss, target of - positive samples will be smoothed to $$1.0 - 1.0/class_num$$ and target of - negetive samples will be smoothed to $$1.0/class_num$$. + positive samples will be smoothed to :math:`1.0 - 1.0 / class\_num` and target of + negetive samples will be smoothed to :math:`1.0 / class\_num`. While :attr:`GTScore` is given, which means the mixup score of ground truth boxes, all looses incured by a ground truth box will be multiplied by its diff --git a/python/paddle/fluid/layers/detection.py b/python/paddle/fluid/layers/detection.py index aa7b4a50b..1ecb9b9e3 100644 --- a/python/paddle/fluid/layers/detection.py +++ b/python/paddle/fluid/layers/detection.py @@ -545,9 +545,9 @@ def yolov3_loss(x, Raises: TypeError: Input x of yolov3_loss must be Variable - TypeError: Input gtbox of yolov3_loss must be Variable" - TypeError: Input gtlabel of yolov3_loss must be Variable" - TypeError: Input gtscore of yolov3_loss must be Variable" + TypeError: Input gtbox of yolov3_loss must be Variable + TypeError: Input gtlabel of yolov3_loss must be Variable + TypeError: Input gtscore of yolov3_loss must be Variable TypeError: Attr anchors of yolov3_loss must be list or tuple TypeError: Attr class_num of yolov3_loss must be an integer TypeError: Attr ignore_thresh of yolov3_loss must be a float number @@ -559,7 +559,7 @@ def yolov3_loss(x, x = fluid.layers.data(name='x', shape=[255, 13, 13], dtype='float32') gtbox = fluid.layers.data(name='gtbox', shape=[6, 4], dtype='float32') gtlabel = fluid.layers.data(name='gtlabel', shape=[6], dtype='int32') - gtscore = fluid.layers.data(name='gtlabel', shape=[6], dtype='int32') + gtscore = fluid.layers.data(name='gtscore', shape=[6], dtype='int32') anchors = [10, 13, 16, 30, 33, 23, 30, 61, 62, 45, 59, 119, 116, 90, 156, 198, 373, 326] anchor_mask = [0, 1, 2] loss = fluid.layers.yolov3_loss(x=x, gtbox=gtbox, gtlabel=gtlabel, -- GitLab