-
I have the following graph structure:
For each edge type, I would like to add an edge weight, I cant find the documentation to add edgeweight in the case of a heterodata object. Furthermore, how can I use the added edge weight knowing that I'm using HGTconv as GNN layer. NN architecutre:
I'm aware of the edge_weight support issues shown in this link https://pytorch-geometric.readthedocs.io/en/latest/notes/cheatsheet.html |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can simply add the data['user', 'writes', 'tweet'].edge_weight = edge_weight Note that |
Beta Was this translation helpful? Give feedback.
You can simply add the
edge_weight
to your data object, e.g.:Note that
HGTConv
doesn't support edge weights, so you would need to use a different layer in this case. For example, you can construct a heterogeneous layer viaHeteroConv
by making use of GNN layers in PyG that support edge weights.