mirror of
https://github.com/facebookresearch/faiss.git
synced 2026-10-12 02:13:36 +00:00
Update 4-GPU.py
This commit is contained in:
@@ -30,9 +30,6 @@ index.add(xb) # add vectors to the index
|
||||
print(index.ntotal)
|
||||
|
||||
k = 4 # we want to see 4 nearest neighbors
|
||||
D, I = index.search(xb[:5], k) # sanity check
|
||||
print(I)
|
||||
print(D)
|
||||
D, I = index.search(xq, k) # actual search
|
||||
print(I[:5]) # neighbors of the 5 first queries
|
||||
print(I[-5:]) # neighbors of the 5 last queries
|
||||
|
||||
Reference in New Issue
Block a user