结构体 faiss::PolysemousTraining
-
struct PolysemousTraining : public faiss::SimulatedAnnealingParameters
优化 ProductQuantizer 中索引的顺序
公共类型
-
enum Optimization_type_t
值
-
enumerator OT_None
-
enumerator OT_ReproduceDistances_affine
默认
-
enumerator OT_Ranking_weighted_diff
与 _2 相同,但使用 y+ 的排名 - y- 的排名
-
enumerator OT_None
公共函数
-
PolysemousTraining()
-
void optimize_pq_for_hamming(ProductQuantizer &pq, size_t n, const float *x) const
重新排序质心,使得汉明距离成为 SDC 距离的良好近似值(由 train 调用)
-
void optimize_ranking(ProductQuantizer &pq, size_t n, const float *x) const
由 optimize_pq_for_hamming 调用
-
void optimize_reproduce_distances(ProductQuantizer &pq) const
由 optimize_pq_for_hamming 调用
-
size_t memory_usage_per_thread(const ProductQuantizer &pq) const
确保我们不会耗尽内存
公共成员
-
Optimization_type_t optimization_type
-
int ntrain_permutation
使用 1/4 的训练点进行优化,最大值为 ntrain_permutation。 如果 ntrain_permutation == 0:在质心上训练
-
double dis_weight_factor
权重距离损失的 exp 衰减
-
size_t max_memory
如果需要超过该数量的 RAM,则拒绝训练
-
std::string log_pattern
-
double init_temperature = 0.7
-
double temperature_decay = 0.9997893011688015
-
int n_iter = 500000
-
int n_redo = 2
-
int seed = 123
-
详细程度 = 0
-
仅翻转位 = 假
-
随机初始化 = 假
-
enum Optimization_type_t