结构体 faiss::QINCoStep

struct QINCoStep

公共函数

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

使用初始估计 xhat 对一组向量 x 进行编码。可以选择性地返回要添加到 xhat 的 delta 以形成新的 xhat

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

公共成员

int d

d:输入维度,K:码本大小,L:残差块数,h:隐藏维度

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