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

Logits and multilabel: Add support for threshold <= 0? #350

Closed
leonweber opened this issue Jul 6, 2021 · 3 comments · Fixed by #351
Closed

Logits and multilabel: Add support for threshold <= 0? #350

leonweber opened this issue Jul 6, 2021 · 3 comments · Fixed by #351
Labels
bug / fix Something isn't working help wanted Extra attention is needed
Milestone

Comments

@leonweber
Copy link

🚀 Feature

Add support for logit input in multilabel classification

Motivation

The docs state that F1 accepts logits and supports multilabel. However, if one uses logits as input in multilabel classification with a NLL loss, the threshold cannot be set to its' natural value 0:

f1 = F1(num_classes=3, threshold=0.0)
ValueError: The `threshold` should be a float in the (0,1) interval, got 0.0

This makes logits input for F1 basically unusable in a multilabel task.

Pitch

It might be a good idea to (a) prominently point out in the docs that the threshold has to be adapted for logits input and (b) allow thresholds smaller than 0.

@leonweber leonweber added enhancement New feature or request help wanted Extra attention is needed labels Jul 6, 2021
@github-actions
Copy link

github-actions bot commented Jul 6, 2021

Hi! thanks for your contribution!, great first issue!

@Borda Borda added bug / fix Something isn't working and removed enhancement New feature or request labels Jul 6, 2021
@Borda
Copy link
Member

Borda commented Jul 6, 2021

@SkafteNicki I think we forgot this after #200

@SkafteNicki
Copy link
Member

Yes, most definitely, going to send a fix soon :]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug / fix Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants