optimizes the order of indices in a ProductQuantizer More...
#include <PolysemousTraining.h>
Public Types | |
enum | Optimization_type_t { OT_None, OT_ReproduceDistances_affine, OT_Ranking_weighted_diff } |
Public Member Functions | |
void | optimize_pq_for_hamming (ProductQuantizer &pq, size_t n, const float *x) const |
void | optimize_ranking (ProductQuantizer &pq, size_t n, const float *x) const |
called by optimize_pq_for_hamming | |
void | optimize_reproduce_distances (ProductQuantizer &pq) const |
called by optimize_pq_for_hamming | |
Public Attributes | |
Optimization_type_t | optimization_type |
int | ntrain_permutation |
double | dis_weight_factor |
std::string | log_pattern |
![]() | |
double | init_temperature |
double | temperature_decay |
int | n_iter |
int | n_redo |
int | seed |
int | verbose |
bool | only_bit_flips |
bool | init_random |
optimizes the order of indices in a ProductQuantizer
Definition at line 127 of file PolysemousTraining.h.
Enumerator | |
---|---|
OT_ReproduceDistances_affine |
default |
OT_Ranking_weighted_diff |
same as _2, but use rank of y+ - rank of y- |
Definition at line 129 of file PolysemousTraining.h.
void faiss::PolysemousTraining::optimize_pq_for_hamming | ( | ProductQuantizer & | pq, |
size_t | n, | ||
const float * | x | ||
) | const |
reorder the centroids so that the Hamming distace becomes a good approximation of the SDC distance (called by train)
Definition at line 945 of file PolysemousTraining.cpp.