Skip to content

Use custom centroids in IVFFlat #4007

Discussion options

You must be logged in to vote

I am not sure if this is the correct way of doing this, but I have been adding the custom centroids into the quantizer, and then initialize the IVF index with this "trained" quantizer, as in the following:

coarse_quantizer = faiss.IndexFlatL2(vector_dim)
coarse_quantizer.add(centroids)
index = faiss.IndexIVFFlat(coarse_quantizer, vector_dim, n_clusters, metrics)

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@asitjain
Comment options

Answer selected by mdouze
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants
Converted from issue

This discussion was converted from issue #4004 on October 29, 2024 20:01.