-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let ImbalancedSampler
accept torch.Tensor
as input
#5138
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5138 +/- ##
=======================================
Coverage 82.98% 82.98%
=======================================
Files 333 333
Lines 18368 18371 +3
=======================================
+ Hits 15243 15246 +3
Misses 3125 3125
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix several typos
ImbalancedSampler
accept torch.Tensor
as input
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Hi, I modified
torch_geometric.loader.ImbalancedSampler
to accepttorch.Tensor
object, i.e., the class distribution as input. Now it is supported to use the class labels to initialize the sampler, as like:And the issue in #5108 should be fixed with minimal adaptation: