提交 35aeb598 编写于 作者: W weishengyu

remove "remove" in metrics

上级 0a8b1773
......@@ -120,11 +120,7 @@ def get_metrics(indices, num_q, num_g, q_pids, g_pids, max_rank=50):
num_valid_q = 0
matches = (g_pids[indices] == q_pids[:, np.newaxis]).astype(np.int32)
for q_idx in range(num_q):
q_pid = q_pids[q_idx]
order = indices[q_idx]
remove = g_pids[order] == q_pid
keep = np.invert(remove)
raw_cmc = matches[q_idx][keep]
raw_cmc = matches[q_idx]
if not np.any(raw_cmc):
continue
cmc = raw_cmc.cumsum()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册