Replies: 1 comment 1 reply
-
You can add them to the data_list = []
for i, data in enumerate(dataset)
data.graph_idx = i
data_list.append(data)
loader = DataLoader(data_list, batch_size=32, shuffle=True)
batch = next(iter(loader))
print(batch.graph_idx) |
Beta Was this translation helpful? Give feedback.
1 reply
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 would like to know if there is a way to retrieve the indices of the data points in a minibatch in PyG?
eg:
dataset = TUDataset(root='/tmp/ENZYMES', name='ENZYMES', use_node_attr=True)
loader = DataLoader(dataset, batch_size=32, shuffle=True)
how can I get the the indices (in original ENZYMES dataset) of those 32 datas in each batch?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions