From 25c9b57bcdfaace015741042559d21b3853bce00 Mon Sep 17 00:00:00 2001 From: JesseyXujin Date: Wed, 24 Jul 2019 16:45:35 +0800 Subject: [PATCH] Modify auc doc. Add output variable description, previously was the scalar type, now changed to the tuple type.test=develop (#18771) --- paddle/fluid/API.spec | 2 +- python/paddle/fluid/layers/metric_op.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) mode change 100644 => 100755 paddle/fluid/API.spec mode change 100644 => 100755 python/paddle/fluid/layers/metric_op.py diff --git a/paddle/fluid/API.spec b/paddle/fluid/API.spec old mode 100644 new mode 100755 index 7c31b5b4e1f..99cdb33136a --- a/paddle/fluid/API.spec +++ b/paddle/fluid/API.spec @@ -399,7 +399,7 @@ paddle.fluid.layers.distribute_fpn_proposals (ArgSpec(args=['fpn_rois', 'min_lev paddle.fluid.layers.box_decoder_and_assign (ArgSpec(args=['prior_box', 'prior_box_var', 'target_box', 'box_score', 'box_clip', 'name'], varargs=None, keywords=None, defaults=(None,)), ('document', '3619a7847709f5868f5e929065947b38')) paddle.fluid.layers.collect_fpn_proposals (ArgSpec(args=['multi_rois', 'multi_scores', 'min_level', 'max_level', 'post_nms_top_n', 'name'], varargs=None, keywords=None, defaults=(None,)), ('document', '80a75103e001ca1ba056fbbe0c6a19f3')) paddle.fluid.layers.accuracy (ArgSpec(args=['input', 'label', 'k', 'correct', 'total'], varargs=None, keywords=None, defaults=(1, None, None)), ('document', 'ef799022a6040597462ae2b3d2f1c407')) -paddle.fluid.layers.auc (ArgSpec(args=['input', 'label', 'curve', 'num_thresholds', 'topk', 'slide_steps'], varargs=None, keywords=None, defaults=('ROC', 4095, 1, 1)), ('document', '300537e259bba86fdefa13a133a0587d')) +paddle.fluid.layers.auc (ArgSpec(args=['input', 'label', 'curve', 'num_thresholds', 'topk', 'slide_steps'], varargs=None, keywords=None, defaults=('ROC', 4095, 1, 1)), ('document', '34b4575807f955f7e8698b8dead23858')) paddle.fluid.layers.exponential_decay (ArgSpec(args=['learning_rate', 'decay_steps', 'decay_rate', 'staircase'], varargs=None, keywords=None, defaults=(False,)), ('document', 'eaf430c5a0380fb11bfe9a8922cd6295')) paddle.fluid.layers.natural_exp_decay (ArgSpec(args=['learning_rate', 'decay_steps', 'decay_rate', 'staircase'], varargs=None, keywords=None, defaults=(False,)), ('document', '63a9e96d446d7de1289f30b832bce36a')) paddle.fluid.layers.inverse_time_decay (ArgSpec(args=['learning_rate', 'decay_steps', 'decay_rate', 'staircase'], varargs=None, keywords=None, defaults=(False,)), ('document', 'ea37a3a8a0b3ce2254e7bc49a0951dbe')) diff --git a/python/paddle/fluid/layers/metric_op.py b/python/paddle/fluid/layers/metric_op.py old mode 100644 new mode 100755 index 8fd50d28c39..e85d5ae4c7e --- a/python/paddle/fluid/layers/metric_op.py +++ b/python/paddle/fluid/layers/metric_op.py @@ -115,7 +115,9 @@ def auc(input, Returns: - Variable: A scalar representing the current AUC. + Variable: A tuple representing the current AUC. + The return tuple is auc_out, batch_auc_out, [ + batch_stat_pos, batch_stat_neg, stat_pos, stat_neg ] Examples: .. code-block:: python -- GitLab