How can I get the edge_index tensor from the adjancency matrix? #3096
Unanswered
codyseally
asked this question in
Q&A
Replies: 1 comment
-
row, col, _ = data.adj_t.().coo()
edge_index = torch.stack([row, col], dim=0) |
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My data object has the
data.adj_t
parameter, giving me the sparse adjacency matrix. How can I get theedge_index
tensor of size[2, num_edges]
from this?Beta Was this translation helpful? Give feedback.
All reactions