📝 本文需要的前置知识:Faiss的基本使用
目录
1. 源码剖析
如下是 Kmeans
的源码(摘自faiss 1.7.4版本):
class Kmeans:
"""
Object that performs k-means clustering and manages the centroids.
The `Kmeans` class is essentially a wrapper around the C++ `Clustering` object.
Parameters
----------
d : int
Dimension of the