Skip to content
Discussion options

You must be logged in to vote

PyG does not perform any magic here. There exists GNN operators than can either (1) not incorporate edge features at all, (2) one-dimensional edge weights, or (3) multi-dimensional edge features. How the edge features are treated inside each operator depends on the operator. Importantly, if you have both edge weights and features, you are responsible to perform the concatenation by yourself, e.g., edge_attr = torch.cat([edge_weight.view(-1, 1), edge_attr], dim=-1).

For multi-dimensional edge features, most GNN operators that can incorporate those will usually just concatenate them to the source node features inside message.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Yoloniverse
Comment options

Answer selected by Yoloniverse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants