-
Hi, In the homogeneous GAE example (https://github.com/pyg-team/pytorch_geometric/blob/master/examples/link_pred.py) the last two lines show how to retrieve the 'fitted' edge_index as follows:
Question: How do I obtain the fitted edge index in the heterogeneous example? I notice that in the heterogeneous example (https://github.com/pyg-team/pytorch_geometric/blob/master/examples/hetero/hetero_link_pred.py) the objective is slightly different as it's fitting to the given ratings specified as an edge_label. However, I'm actually interested in the same objective as in the homogeneous variant: I'd like to predict the edge_index itself by optimizing the network to fit the labelled probabilities of positive/negative edge links. This requires some sort of transformation of the encoded z_dict to an edge_index (see below function decode_all). I've made the following alterations and would like to ask your advice particularly on the decode_all function within the Model class and I wonder whether the forward function in EdgeEncoder should also be adjusted to reflect binary cross entropy objective?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
I think your general procedure looks correct. You would either iterate over each pair of node type and compute/decode the local adjacencies between node types. Alternatively, you can concatenate oll matrices inside your dict in the first dimension, and then just do reconstruction as in the homogeneous case. |
Beta Was this translation helpful? Give feedback.
I think your general procedure looks correct. You would either iterate over each pair of node type and compute/decode the local adjacencies between node types. Alternatively, you can concatenate oll matrices inside your dict in the first dimension, and then just do reconstruction as in the homogeneous case.