Skip to content
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

APLoss RuntimeError #58

Closed
s-rog opened this issue Apr 30, 2024 · 0 comments
Closed

APLoss RuntimeError #58

s-rog opened this issue Apr 30, 2024 · 0 comments

Comments

@s-rog
Copy link

s-rog commented Apr 30, 2024

  File "~/micromamba/envs/jpt/lib/python3.10/site-packages/libauc/losses/auc.py", line 313, in forward
    assert sum(pos_mask) > 0, "Input data has no positive sample! Please use 'libauc.sampler.DualSampler' for data resampling!"
RuntimeError: Boolean value of Tensor with more than one value is ambiguous

I'm trying to use this for a binary problem but have not been able to get it to work (torch 2.3).
I looked into a code but couldn't find any glaring errors as sum(Tensor) should reduce pos_mask down to a single element...

Edit: Some of my input shapes were wrong

@s-rog s-rog closed this as completed Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant