torch_geometric.nn.models.InnerProductDecoder
- class InnerProductDecoder[source]
Bases:
Module
The inner product decoder from the “Variational Graph Auto-Encoders” paper.
\[\sigma(\mathbf{Z}\mathbf{Z}^{\top})\]where \(\mathbf{Z} \in \mathbb{R}^{N \times d}\) denotes the latent space produced by the encoder.
- forward(z: Tensor, edge_index: Tensor, sigmoid: bool = True) Tensor [source]
Decodes the latent variables
z
into edge probabilities for the given node-pairsedge_index
.