self-loop as a feature for Graph Classification #6358
Unanswered
Eyemissing
asked this question in
Q&A
Replies: 1 comment
-
Most GNN layers will already implicitly assume a self-loop by adding a simple skip-connection. If you want to treat self-loops explicitly, you could do something like out = conv1(x, edge_index[:, edge_index[0] != edge_index[1]]) + conv2(x, edge_index[:, edge_index[0] == edge_index[1]]) |
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.
-
In my case, I have a scenario, where a self-loop is an important information used as a feature for my graph classification. As far as I understand this is in GNN not possible. Is this correct? what might be a work-around?
BR Mike
Beta Was this translation helpful? Give feedback.
All reactions