Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ hnswlib Public
forked from Heccc257/hnswlib

Header-only C++/python library for fast approximate nearest neighbors

License

Notifications You must be signed in to change notification settings

freign/hnswlib

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

551 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage

首先进入项目目录,按照需求修改项目目录下的config.yml

use_pq 1  # 1代表使用pq,0代表不使用
m 320  # m表示量化的子空间维度
nbits 4 # 每个子空间共有2^nbits个簇心
n 10000 # 输入向量个数
pq_dir /share/ann_benchmarks/gist/  # pq数据存放位置
train_dir /root/gist/train.fvecs   # train数据存放位置
test_dir /root/gist/test.fvecs     # test数据存放位置
plot_dir /root/gist   # 图片存放的目录

之后运行run.py即可

python3 run.py

算法运行之后会在数据所在的目录创建.res文件,保存结果

如果有画图需求继续运行plot.py

python3 plot.py

About

Header-only C++/python library for fast approximate nearest neighbors

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 78.6%
  • Python 19.5%
  • CMake 1.8%
  • Makefile 0.1%