From 0be1ce58507a15c32bdd85db82540d836e91352e Mon Sep 17 00:00:00 2001 From: Genieliu Date: Mon, 1 Apr 2019 20:17:07 +0800 Subject: [PATCH] test=develop --- python/paddle/fluid/metrics.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/paddle/fluid/metrics.py b/python/paddle/fluid/metrics.py index dfe8259139d..c7c82f28e7c 100644 --- a/python/paddle/fluid/metrics.py +++ b/python/paddle/fluid/metrics.py @@ -243,6 +243,7 @@ class Precision(MetricBase): raise ValueError("The 'labels' must be a numpy ndarray.") sample_num = labels.shape[0] preds = np.rint(preds).astype("int32") + for i in range(sample_num): pred = preds[i] label = labels[i] -- GitLab