Unverified Commit 1a9b8148 authored by Matthijs Douze's avatar Matthijs Douze Committed by GitHub

Update 4-GPU.py

parent e289ddd2
...@@ -30,9 +30,6 @@ index.add(xb) # add vectors to the index ...@@ -30,9 +30,6 @@ index.add(xb) # add vectors to the index
print(index.ntotal) print(index.ntotal)
k = 4 # we want to see 4 nearest neighbors 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 D, I = index.search(xq, k) # actual search
print(I[:5]) # neighbors of the 5 first queries print(I[:5]) # neighbors of the 5 first queries
print(I[-5:]) # neighbors of the 5 last queries print(I[-5:]) # neighbors of the 5 last queries
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment