Total_fea not needed now. Better and faster retrieval performance.

Total_fea not needed now. Better and faster retrieval performance.
This commit is contained in:
RVC-Boss 2023-04-26 19:17:48 +08:00 committed by GitHub
parent 9be8048302
commit dc0c8756b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -123,6 +123,7 @@ class VC(object):
# _, I = index.search(npy, 1)
# npy = big_npy[I.squeeze()]
#by github @nadare881
score, ix = index.search(npy, k=8)
weight = np.square(1 / score)
weight /= weight.sum(axis=1, keepdims=True)