From 390bc568d1b453da960569b26b361c338cf22e2c Mon Sep 17 00:00:00 2001 From: nunzip Date: Tue, 4 Dec 2018 20:02:08 +0000 Subject: Fix Bug on -n flag --- part2.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/part2.py b/part2.py index 1d6485c..9a30aad 100755 --- a/part2.py +++ b/part2.py @@ -97,8 +97,10 @@ def test_model(gallery_data, probe_data, gallery_label, probe_label, gallery_cam nneighbors = np.zeros((ranklist.shape[0],nsize)) nnshowrank = (np.zeros((ranklist.shape[0],nsize))).astype(object) + for i in range(args.multrank): - args.neighbors = test_table[i] + if args.multrank!= 1: + args.neighbors = test_table[i] for probe_idx in range(probe_data.shape[0]): row = ranklist[probe_idx] n = 0 -- cgit v1.2.3-54-g00ecf