Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
faiss
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
faiss
Commits
1a9b8148
Unverified
Commit
1a9b8148
authored
Dec 18, 2017
by
Matthijs Douze
Committed by
GitHub
Dec 18, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update 4-GPU.py
parent
e289ddd2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
3 deletions
+0
-3
4-GPU.py
tutorial/python/4-GPU.py
+0
-3
No files found.
tutorial/python/4-GPU.py
View file @
1a9b8148
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment