Stratify the Data list of Pytorch_geometric.data.Data without creating Dataset #2265
Unanswered
naveen-kinnal
asked this question in
Q&A
Replies: 1 comment
-
In general you could pass a sampler to your DataLoader. Check out this example. |
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.
-
Hello. I have a custom dataset for which I am building a list of Data objects
I am directly feeding this to the DataLoader (without creating a Dataset object), since I need not save my data
data_loader = torch_geometric.data.DataLoader(data_list, batch_size=64, shuffle=True)
My custom dataset contains labels in 0,1 and is the class distribution is not proper. Hence, I want to stratify my batches in order to equally distribute the labels.
How can I do this directly using the Data List?
Beta Was this translation helpful? Give feedback.
All reactions