torch_geometric.nn.pool.L2KNNIndex

class L2KNNIndex(emb: Optional[Tensor] = None)[source]

Bases: KNNIndex

通过faiss库基于\(L_2\)度量执行快速的\(k\)-最近邻搜索(\(k\)-NN)。

Parameters:

emb (torch.Tensor, optional) – The data points to add. (default: None)