We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
code: import numpy as np import faiss
ver = np.random.randn(1000,512) ver = ver .astype(np.float32) print(ver .shape) pq = faiss.ProductQuantizer(512, 4, 3) #dim:512 seg:4 bit:3 pq.train(ver) codes = pq.compute_codes(ver) print(codes.shape) print(codes)
result: #got seg:2 (1000, 512) (1000, 2) [[ 58 5] [ 62 7] [ 63 11] ... [171 7] [ 57 7] [ 92 1]]
The text was updated successfully, but these errors were encountered:
@yuleung This repository is merely a build automation for faiss pypi packages. Ask the usage question in the official repository.
Sorry, something went wrong.
No branches or pull requests
code:
import numpy as np
import faiss
ver = np.random.randn(1000,512)
ver = ver .astype(np.float32)
print(ver .shape)
pq = faiss.ProductQuantizer(512, 4, 3) #dim:512 seg:4 bit:3
pq.train(ver)
codes = pq.compute_codes(ver)
print(codes.shape)
print(codes)
result: #got seg:2
(1000, 512)
(1000, 2)
[[ 58 5]
[ 62 7]
[ 63 11]
...
[171 7]
[ 57 7]
[ 92 1]]
The text was updated successfully, but these errors were encountered: