faiss icon indicating copy to clipboard operation
faiss copied to clipboard

Does hnsw or ivf support angular when constructing?

Open KunmingS opened this issue 5 years ago • 4 comments

I am using python interface, but when I add param such as faiss.METRIC_INNER_PRODUCT or faiss.METRIC_L2 in construction function, like faiss.IndexHNSWSQ(), it raises error for too many parameters. But I found in c++ version, there are parameters for metric type. So Why I can't use them in python?

KunmingS avatar May 18 '21 09:05 KunmingS

index = faiss.IndexHNSWSQ(10, 0, 32, faiss.METRIC_INNER_PRODUCT)
index.metric_type

works for me.

mdouze avatar May 19 '21 19:05 mdouze

Thanks for your help. While when I try these code, it raises error: image I am using faiss 1.5.3.

KunmingS avatar May 20 '21 06:05 KunmingS

Sloved after I install faiss through conda, which is faiss 1.7.0. I am using pip before. Hope you can update faiss package on pip, thanks!

KunmingS avatar May 20 '21 06:05 KunmingS

Oh the name change to faiss-cpu which version is 1.7.0, not faiss. Thanks again

KunmingS avatar May 20 '21 07:05 KunmingS