Replies: 1 comment
-
Not that I am aware of, but you can quite easily write something like this by yourself: class MyConv(MessagePassing):
def __init__(self, in_channels, out_channels, edge_dim):
super().__init__()
self.lin1 = Linear(in_channels + edge_dim, out_channels, bias=False)
self.lin2 = Linear(in_channels, out_channels)
def forward(self, x, edge_index, edge_weight, edge_attr):
out = self.propagate(edge_index, x=x=, edge_weight=edge_weight, edge_attr=edge_attr)
return self.lin2(x) + out
def message(self, x_j, edge_weight, edge_attr):
out = self.lin1(torch.cat([x_j, edge_attr], dim=-1))
return edge_weight.view(-1, 1) * out |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
GCNconv
only supports positive edges andSignedConv
only supports edge_index without edge_weight. Is there a conv layer that supports both edge_attr/edge_weights and negative edges? Because my Adjacency matrix contains negative values.Beta Was this translation helpful? Give feedback.
All reactions