Update dsr_distance.py

This commit is contained in:
Lingxiao He 2020-07-12 13:31:21 +08:00 committed by GitHub
parent f8d468647c
commit 115de22532
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,5 +39,6 @@ def compute_dsr_dist(array1, array2, distmat, scores, topk=30):
dist[i, index[i, j]] = (min_value * score).sum()
dist = dist.cpu()
dist = dist.numpy()
dist = 0.98 * dist + 0.02 * distmat
return dist