torch_geometric.nn.conv.EdgeConv
- class EdgeConv(nn: Callable, aggr: str = 'max', **kwargs)[source]
Bases:
MessagePassing来自“Dynamic Graph CNN for Learning on Point Clouds”论文的边缘卷积操作符。
\[\mathbf{x}^{\prime}_i = \sum_{j \in \mathcal{N}(i)} h_{\mathbf{\Theta}}(\mathbf{x}_i \, \Vert \, \mathbf{x}_j - \mathbf{x}_i),\]其中 \(h_{\mathbf{\Theta}}\) 表示一个神经网络,即 一个多层感知器(MLP)。
- Parameters:
nn (torch.nn.Module) – 一个神经网络 \(h_{\mathbf{\Theta}}\),它将成对连接的节点特征
x从形状[-1, 2 * in_channels]映射到形状[-1, out_channels],例如,由torch.nn.Sequential定义。aggr (str, optional) – The aggregation scheme to use (
"add","mean","max"). (default:"max")**kwargs (optional) – Additional arguments of
torch_geometric.nn.conv.MessagePassing.
- Shapes:
输入: 节点特征 \((|\mathcal{V}|, F_{in})\) 或 \(((|\mathcal{V}|, F_{in}), (|\mathcal{V}|, F_{in}))\) 如果是二分图, 边索引 \((2, |\mathcal{E}|)\)
output: node features \((|\mathcal{V}|, F_{out})\) or \((|\mathcal{V}_t|, F_{out})\) if bipartite