diff options
author | Vasil Zlatanov <v@skozl.com> | 2018-12-04 15:37:28 +0000 |
---|---|---|
committer | Vasil Zlatanov <v@skozl.com> | 2018-12-04 15:37:28 +0000 |
commit | e9bea6bb29b352fd63fb4d3bc1ee854782d798b8 (patch) | |
tree | 4e98f66ba667500bf5472fbc769d3d6b59304c90 | |
parent | 066b96d138ed6c4b611382bf4d134eef7ebbdbbf (diff) | |
download | vz215_np1915-e9bea6bb29b352fd63fb4d3bc1ee854782d798b8.tar.gz vz215_np1915-e9bea6bb29b352fd63fb4d3bc1ee854782d798b8.tar.bz2 vz215_np1915-e9bea6bb29b352fd63fb4d3bc1ee854782d798b8.zip |
Fix conditions for -n
-rwxr-xr-x | part2.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -103,8 +103,8 @@ def test_model(gallery_data, probe_data, gallery_label, probe_label, gallery_cam nnshowrank[probe_idx][q] = showfiles_train[row[n]] # q += 1 n += 1 - if (args.neighbors): - target_pred[probe_idx] = probe_label[probe_idx] + if (args.neighbors) and (probe_label[probe_idx] in nneighbors[probe_idx]): + target_pred[probe_idx] = probe_label[probe_idx] else: target_pred[probe_idx] = nneighbors[probe_idx][0] |