创建消息传递网络 — pytorch_geometric 文档 (pytorch-geometric.readthedocs.io)
https://arxiv.org/abs/1801.07829
import torch
from torch.nn import Sequential as Seq, Linear, ReLU
from torch_geometric.nn import MessagePassingclass EdgeConv(MessagePassing):
def __init__(self, in_channels, out_channels):
super().__init__(aggr='max') # "Max" aggregation.
self.mlp = Seq(Linear(2 * in_channels, out_channels),
ReLU(),
Linear(out_channels,