torch_geometric.nn.conv.ARMAConv
- class ARMAConv(in_channels: int, out_channels: int, num_stacks: int = 1, num_layers: int = 1, shared_weights: bool = False, act: Optional[Callable] = ReLU(), dropout: float = 0.0, bias: bool = True, **kwargs)[source]
Bases:
MessagePassing来自“带有卷积ARMA滤波器的图神经网络”论文的ARMA图卷积算子。
\[\mathbf{X}^{\prime} = \frac{1}{K} \sum_{k=1}^K \mathbf{X}_k^{(T)},\]其中 \(\mathbf{X}_k^{(T)}\) 由以下递归定义
\[\mathbf{X}_k^{(t+1)} = \sigma \left( \mathbf{\hat{L}} \mathbf{X}_k^{(t)} \mathbf{W} + \mathbf{X}^{(0)} \mathbf{V} \right),\]其中 \(\mathbf{\hat{L}} = \mathbf{I} - \mathbf{L} = \mathbf{D}^{-1/2} \mathbf{A} \mathbf{D}^{-1/2}\) 表示 修正的拉普拉斯算子 \(\mathbf{L} = \mathbf{I} - \mathbf{D}^{-1/2} \mathbf{A} \mathbf{D}^{-1/2}\)。
- Parameters:
in_channels (int) – Size of each input sample, or
-1to derive the size from the first input(s) to the forward method.out_channels (int) – 每个输出样本的大小 \(\mathbf{x}^{(t+1)}\)。
num_stacks (int, 可选) – 并行堆栈的数量 \(K\)。 (默认:
1).num_layers (int, optional) – 层数 \(T\). (默认:
1)act (callable, optional) – Activation function \(\sigma\). (default:
torch.nn.ReLU())shared_weights (int, 可选) – 如果设置为
True,每个堆栈中的层将共享相同的参数。(默认值:False)dropout (float, optional) – 跳跃连接的丢弃概率。 (默认值:
0.)bias (bool, optional) – If set to
False, the layer will not learn an additive bias. (default:True)**kwargs (optional) – Additional arguments of
torch_geometric.nn.conv.MessagePassing.
- Shapes:
input: node features \((|\mathcal{V}|, F_{in})\), edge indices \((2, |\mathcal{E}|)\), edge weights \((|\mathcal{E}|)\) (optional)
output: node features \((|\mathcal{V}|, F_{out})\)