Heterogeneous graph link prediction issue #3860
-
Hi, I'm quite new in the PyG world. I need to implement a link prediction task on my custom heterogeneous graph. I generate only some nodes of it in order to simplify the procedure and test step by step the implementation of a GNN for link prediction.
I am trying to apply the link prediction example found here but after splitting the dataset into train, val and test I'm now stuck in the part of the model definition. In particular at row 97, when the model tries to initialize the encoder passing the x_dict and the edge_index_dict
then it raises the following error: It seems reasonable, since the MessagePassing wants tensors of edges, while I am passing the dictionary of the edges.... but with the dataset of the example (and even with other preloaded datasets) the error does not raise... And the HeteroData objects looks of course very similar in the structure. Where am I doing wrong? Could anyone help me with some hints? I am stucked here since few days... :( |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Did you forget to call |
Beta Was this translation helpful? Give feedback.
Did you forget to call
to_hetero
somewhere? :)