Batching in NeighborSampler #7687
Unanswered
mailforharry98
asked this question in
Q&A
Replies: 2 comments 3 replies
-
Are you referring to torch_geometric.nn.loader.NeighborSampler? Could you elaborate on what you mean by balanced batches? |
Beta Was this translation helpful? Give feedback.
3 replies
-
try something like this:
This code will create a WeightedRandomSampler instance and then iterate over the batches. Each batch will contain an equal number of samples from the two classes. |
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 want to create balanced batches for training but could not figure out where is batching done in the NeighborSampler code.
Beta Was this translation helpful? Give feedback.
All reactions