AscendIndexIVFSQFuzzy
API定义 |
AscendIndexIVFSQFuzzy(int dims, int nlist, faiss::ScalarQuantizer::QuantizerType qtype = ScalarQuantizer::QuantizerType::QT_8bit, faiss::MetricType metric = MetricType::METRIC_INNER_PRODUCT, AscendIndexIVFSQFuzzyConfig config = AscendIndexIVFSQFuzzyConfig()) |
---|---|
功能描述 |
AscendIndexIVFSQFuzzy的构造函数,生成AscendIndexIVFSQFuzzy,此时根据“config”中配置的值设置NPU侧资源。 |
输入 |
int dims:AscendIndexIVFSQFuzzy管理的一组特征向量的维度。 int nlist:聚类中心的个数,与算子生成脚本中的“coarse_centroid_num”参数对应。 faiss::ScalarQuantizer::QuantizerType qtype:AscendIndexIVFSQFuzzy的量化器类型。 faiss::MetricType metric:AscendIndexIVFSQFuzzy在执行特征向量相似度检索的时候使用的距离度量类型。 AscendIndexIVFSQFuzzyConfig config:NPU侧资源配置。 |
输出 |
无 |
返回值 |
无 |
约束说明 |
|