diff --git a/paddle/fluid/operators/detection/yolov3_loss_op.cc b/paddle/fluid/operators/detection/yolov3_loss_op.cc index 2dbe46de0be137c006d2a7c3a997699fbd773364..f4a6a68cd0cbc0a49d2fd2a6ad7040edfdcf7cbd 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 aa7b4a50be24fcecbfefeba710eb9cbec5ecd4ec..1ecb9b9e344d07fc19f827912567e04bd1545812 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,