From 0b88f1efd7e02b27fe8e76c389916e1d07bc6dd0 Mon Sep 17 00:00:00 2001 From: qiaolongfei Date: Mon, 25 Jun 2018 15:58:34 +0800 Subject: [PATCH] change predictions to preds --- python/paddle/fluid/metrics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/metrics.py b/python/paddle/fluid/metrics.py index c9cd88197..17bb0826a 100644 --- a/python/paddle/fluid/metrics.py +++ b/python/paddle/fluid/metrics.py @@ -596,12 +596,12 @@ class Auc(MetricBase): tp, fn, tn, fp = 0, 0, 0, 0 for i, lbl in enumerate(labels): if lbl: - if predictions[i, 1] >= thresh: + if preds[i, 1] >= thresh: tp += 1 else: fn += 1 else: - if predictions[i, 1] >= thresh: + if preds[i, 1] >= thresh: fp += 1 else: tn += 1 -- GitLab