Link_pred.py using GAE produce 3M+ edge index as the decoded edge index size! #7212
-
Hi, Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
Yes, it produces a score for every possible node pair. With |
Beta Was this translation helpful? Give feedback.
-
Yeah, you're completely right.
Thanks for your response.
…On Thu, Apr 20, 2023, 2:34 AM Matthias Fey ***@***.***> wrote:
Yeah, that is possible, but you would rather use sigmoid here instead of
softmax. Alternatively, I suggest to use something like torch.topk to
find the top-k edges for each node.
—
Reply to this email directly, view it on GitHub
<#7212 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL3OEC57ZE5WLPXLIQIUIPTXCDKG5ANCNFSM6AAAAAAXE4GW4I>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Hi again Matthias, I have an issue creating a Data object in PyG which contains a list of graphs to use this GAE link prediction in an inductive way on those sets of graphs (multi-graphs). I have an adj_list and node_features list, and defined my data_list in PyG 2.xx as: data_list = [ ] in the end, when I print the len(data_list) it gives me the correct number of graphs that I have. Also, for a single graph, e.g., data_list[0], it gives me the correct shape for "x", "y", and "edge_index" as: The 0th graph in data_list has: Data(x=[33, 2], edge_index=[2, 69], y=[33, 1] Now my problem is although in MUTAG / TUDataset (https://colab.research.google.com/drive/1I8a0DfQ3fI7Njc62__mVXUlcAleUclnb?usp=sharing#scrollTo=mHSP6-RBOqCE), it is possible to access "dataset.num_features" directly, in my data_list, when I run "data_list.num_features", I get the following error: " AttributeError: 'list' object has no attribute 'num_node_features' " Also, when I use "data_list_pyg = torch_geometric.data.Data(data_list)", the error is solved, but the "len" of the "data_list_pyg" is shown as 1 and the number of features is shown as 0, however, it should be 91 and 2. respectively. Would you please elaborate more that how can I have the same format of multi-graph datasets in PyG such as MUTAG to be able to get "data_list.num_features" without any error? Thanks |
Beta Was this translation helpful? Give feedback.
Yes, it produces a score for every possible node pair. With
2708
nodes, this amounts to2708*2708/2 = 3.6M
pairs (divided by half since the graph is undirected).