imbalanced_sampler #6366
Unanswered
zuluokonkwo
asked this question in
Q&A
Replies: 2 comments 17 replies
-
Do you have a minimal example to reproduce? This would help to track down the issue. |
Beta Was this translation helpful? Give feedback.
17 replies
-
Converting y Tensor to torch long will probably solve the assertion error.
|
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.
-
Hi,
I'm presently working on an imbalanced graph data. I tried using the torch geometric imbalanced sampler class to address this issue, but it always gives an error.
Scenario 1: When I define a sampler with the whole dataset as in "sampler=ImbalancedSampler(dataset)" I get an out of index error when training with training data.
Scenario 2: When I define a sampler with the training dataset as in "sampler=ImbalancedSampler(train_dataset)" I get an assertion error. I understand what's going on in scenario 2 "assert len(dataset) == y.numel()".
Is there a way around this?
Beta Was this translation helpful? Give feedback.
All reactions