From acd549568221120f30fd2463c137854c3fb9e32d Mon Sep 17 00:00:00 2001 From: Jon Almazan Date: Thu, 29 Aug 2019 10:36:52 +0100 Subject: [PATCH] fix bug --- dirtorch/datasets/generic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dirtorch/datasets/generic.py b/dirtorch/datasets/generic.py index bc0f14d..87402b0 100644 --- a/dirtorch/datasets/generic.py +++ b/dirtorch/datasets/generic.py @@ -206,7 +206,7 @@ def eval_query_AP(self, query_idx, scores): gt, scores = gt[keep], scores[keep] gt_sorted = gt[np.argsort(scores)[::-1]] positive_rank = np.where(gt_sorted == 1)[0] - ap = compute_average_precision(positive_rank) + return compute_average_precision(positive_rank) else: d = {} for mode in ('easy', 'medium', 'hard'):