score_ah
接口定义
def score_ah(dimensions_per_block: int, anisotropic_quantization_threshold: float, training_sample_size: int, min_cluster_size: int, hash_type: string, training_iterations: int) -> scann.scann_ops.py.scann_builder.ScannBuilder
接口用途
添加PQ分区量化的相关参数。与开源算法接口保持一致。
参数说明
参数名称 |
描述 |
数据类型 |
取值范围 |
---|---|---|---|
dimensions_per_block |
PQ量化合并维度数。 |
int |
[1, 数据维度] |
anisotropic_quantization_threshold |
不对称分桶参数(只对dot product有效)。 |
float |
[0, 1] |
training_sample_size |
PQ分区训练时底库抽样个数。 |
int |
[0, 底库数量] |
min_cluster_size |
最小PQ分区包含的底库向量个数。 |
int |
[0, 底库数量] |
hash_type |
PQ量化类型。 |
字符串 |
“lut16”或“lut256”。 |
training_iterations |
训练循环次数。 |
int |
大于等于1。 |
返回值
数据类型 |
说明 |
---|---|
scann.scann_ops.py.scann_builder.ScannBuilder |
ScannBuilder类用于接收构建参数。 |
父主题: KScaNN接口说明