Struct faiss::QINCoStep

struct QINCoStep

Public Functions

QINCoStep(int d, int K, int L, int h)
inline nn::FFN &get_residual_block(int i)
nn::Int32Tensor2D encode(const nn::Tensor2D &xhat, const nn::Tensor2D &x, nn::Tensor2D *residuals = nullptr) const

encode a set of vectors x with intial estimate xhat. Optionally return the delta to be added to xhat to form the new xhat

nn::Tensor2D decode(const nn::Tensor2D &xhat, const nn::Int32Tensor2D &codes) const

Public Members

int d

d: input dim, K: codebook size, L: # of residual blocks, h: hidden dim

int K
int L
int h
nn::Embedding codebook
nn::Linear MLPconcat
std::vector<nn::FFN> residual_blocks