torch_geometric.nn.dense.DenseGINConv
- class DenseGINConv(nn: Module, eps: float = 0.0, train_eps: bool = False)[source]
Bases:
Module参见
torch_geometric.nn.conv.GINConv.- forward(x: Tensor, adj: Tensor, mask: Optional[Tensor] = None, add_loop: bool = True) Tensor[source]
前向传播。
- Parameters:
x (torch.Tensor) – Node feature tensor \(\mathbf{X} \in \mathbb{R}^{B \times N \times F}\), with batch-size \(B\), (maximum) number of nodes \(N\) for each graph, and feature dimension \(F\).
adj (torch.Tensor) – Adjacency tensor \(\mathbf{A} \in \mathbb{R}^{B \times N \times N}\). The adjacency tensor is broadcastable in the batch dimension, resulting in a shared adjacency matrix for the complete batch.
mask (torch.Tensor, optional) – Mask matrix \(\mathbf{M} \in {\{ 0, 1 \}}^{B \times N}\) indicating the valid nodes for each graph. (default:
None)add_loop (bool, optional) – 如果设置为
False,该层将不会自动向邻接矩阵添加自环。 (默认:True)
- Return type: