Edge attributes with heterographs #6398
-
|
Hi all, I am trying to train a model that performs link prediction on an Heterograph. In particular, at the moment I am struggling with associating to every edge and additional embedding. Currently, I am doing this: Where node_features_dict and edge_attr_dict are two vocabularies containing for every node and edge type a feature vector of shape [n, 128]. RuntimeError: The size of tensor a (3284) must match the size of tensor b (1466) at non-singleton dimension 0` Essentially there the dimension of x and edge_attr are respectively: Am I doing something wrong? Is there an example showing how to handle edge-related attributes with Heterographs? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
I am a little confused did you use |
Beta Was this translation helpful? Give feedback.
-
|
I checked and seems to be a problem of the batch generation. So inside the dataset, the number of edge_indexes and number o edge_attributes is the same. However, once I sample a batch there are some inconsistencies between the number of edges sampled and their relative attributes and this is the cause of the problem: I am using the LinkNeighborLoader: But I really can't understand why this happens. |
Beta Was this translation helpful? Give feedback.
I checked and seems to be a problem of the batch generation.
Essentially my dataset looks like this: