-
Hello, I'm trying to see if there are any PyG layers out there that also update the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Yes, most if not all GNN layers proposed in research do not update edge features. One exception that comes to my mind is the class MyEdgeConv(MessagePassing):
def __init__(self):
super().__init__(aggr='add')
def forward(self, x: Tensor, edge_index: Adj) -> Tensor:
edge_attr = self.edge_updater(edge_index, x=x)
out = self.propagate(edge_index, edge_attr=edge_attr,
size=(x.size(0), x.size(0)))
return out, edge_attr
def edge_update(self, x_j: Tensor, x_i: Tensor) -> Tensor:
return x_j - x_i
def message(self, edge_attr: Tensor) -> Tensor:
return edge_attr |
Beta Was this translation helpful? Give feedback.
Yes, most if not all GNN layers proposed in research do not update edge features. One exception that comes to my mind is the
MetaLayer
in PyG. Nonetheless, it should be straightforward to allow something like this in PyG via theedge_updater
functionality: