Replies: 2 comments 6 replies
-
data = data.subgraph({
'paper': torch.tensor([3, 4]),
'author': torch.arange(data['author'].num_nodes,
'conference': torch.arange(data['conference'].num_nodes,
}) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
6 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.
-
I have a graph and I would like to sample it based on the indices of a given node.
For example, let's say that I have the following graph and I would like to select
'paper': torch.tensor([3, 4])
, but I would like to receive a full graph back containing alsoauthor
,conference
, and all edges that are related to thesepaper
indices.I tried to use
subgraph
function, but I could not find an easy way to solve it.Does anyone have any idea that can lead me to the right path?
Beta Was this translation helpful? Give feedback.
All reactions