How to explain the output of LabelPropagation model? #8283
kenenbek
started this conversation in
Show and tell
Replies: 1 comment
-
Note that you need to define a bidirectional edge: import torch
from torch_geometric.nn.models import LabelPropagation
y = torch.tensor([0, 1])
edge_index = torch.tensor([[0, 1], [1, 0]])
model = LabelPropagation(num_layers=1, alpha=1)
out = model(y=y, edge_index=edge_index)
print(out) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a simple setting, where I have two nodes, and an edge goes from node-0 to node-1.
node-0 has class 0 and node-1 has class 1
I would expect that such setting with alpha=1 will just interchange labels of nodes. And
out
will be like this:But I get tensor of zeros. How to explain it?
Beta Was this translation helpful? Give feedback.
All reactions