Why do the rows and columns seem to be reversed in to_sparse_tensor? Thanks a lot. #4901
Answered
by
rusty1s
storyandwine
asked this question in
Q&A
-
In to_sparse_tensor row = edge_index[1], col = edge_index[0] pytorch_geometric/torch_geometric/transforms/to_sparse_tensor.py Lines 62 to 66 in e8b6def While in other functions like dropout_adj row = edge_index[0] ,col = edge_index[1] |
Beta Was this translation helpful? Give feedback.
Answered by
rusty1s
Jul 1, 2022
Replies: 1 comment
-
Yes, this is due to |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
storyandwine
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, this is due to
ToSparseTensor
saving the transposed adjacency matrixadj_t
(which accelerates message passing). The transposed adjacency matrix is given by simply swappingrow
andcol
.