目录
Faiss Milvus
这个也不错:
faiss,h5py检索:
f=h5py.File('gist-960-euclidean.hdf5','r')
x=f['train'][:]
q=f['test'][:]
index = faiss.IndexFlatL2(x.shape[1]) # build the index
print(index.is_trained)
index.add(x) # add vectors to the index
print(index.ntotal)
k = 100
start = time.time()
D, I = index.search(q, k) # actual search
print('查询数据耗时{0}秒'.format((time.time() - start)))
win10下安装faiss和deepmatch,可分别用以下