Replies: 1 comment 2 replies
-
Can't you do data.e_id = torch.arange(data.num_edges)
...
data.edge_attr[batch.e_id] = batch.edge_attr |
Beta Was this translation helpful? Give feedback.
2 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.
-
I sampled a huge graph and got a small
Data
object for each batch, but I cannot find an efficient way to mapedge_attr
back to the original node indices after I mapedge_index
back to the original node indices with the following code:where
n_id
is initially justtorch.arange(num_of_nodes)
.The only way I can think of is to directly search for each new edge in the mapped edge indices... But that is way too inefficient.
Beta Was this translation helpful? Give feedback.
All reactions