Loss function in GNN
#9526
-
Hello, Does this loss propagate on each node in each subgraph? And, how can add edge attribute to HGNN model? I have both node and edge features (Hetero Data). |
Beta Was this translation helpful? Give feedback.
Answered by
rusty1s
Aug 19, 2024
Replies: 1 comment
-
You can just implement this loss in vanilla PyTorch on the node embeddings. Gradients are then backpropagated to all nodes that are reachable within the GNN. If you want to use a GNN layer that supports edge features, take a look at https://pytorch-geometric.readthedocs.io/en/latest/cheatsheet/gnn_cheatsheet.html |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
AlizadehF
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can just implement this loss in vanilla PyTorch on the node embeddings. Gradients are then backpropagated to all nodes that are reachable within the GNN.
If you want to use a GNN layer that supports edge features, take a look at https://pytorch-geometric.readthedocs.io/en/latest/cheatsheet/gnn_cheatsheet.html