question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Zero-Shot-Classification: multi_class or multi_label?

See original GitHub issue

https://github.com/huggingface/transformers/blob/068df740bd73b95e9a1e233e47608df942fda9da/src/transformers/pipelines.py#L1048 Since we’re allowing multiple labels to be true, shouldn’t this be called multi_label instead of multi_class?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
joeddavcommented, Mar 10, 2021

@peregilk I think you’re right, it’s consistently been a little bit confusing. I don’t think the parameter names need to exactly reflect the vernacular, but I do think we can deprecate multi_class and rename it to multi_label while keeping the behavior the same. I think that’s the solution with the least confusion. I’ll send a PR. The only case where it’s not multi-class is when only a single label is passed, in which case the multi_class argument is treated as true since it doesn’t make sense to softmax over a single label.

0reactions
peregilkcommented, Mar 11, 2021

That sounds like a great solution. Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fine-Tune for MultiClass or MultiLabel-MultiClass - Models
Hi,. I want to build a: MultiClass Label (eg: Sentiment with VeryPositiv, Positiv, No_Opinion, Mixed_Opinion, Negativ, VeryNegativ).
Read more >
What is the difference between Multiclass and Multilabel ...
Multiclass classification makes the assumption that each sample is assigned to one and only one label: a fruit can be either an apple...
Read more >
Multi-label Zero-shot Classification by Learning ... - BMVC 2020
Multi-label zero-shot classification aims to predict multiple unseen class labels for an input image. It is more challenging than its single-label counterpart.
Read more >
Zero-Shot Text Classification with Hugging Face
In zero-shot classification, you can define your own labels and then run classifier to assign a probability to each label.
Read more >
A complete tutorial on zero-shot text classification
We mainly find the implementations of zero-shot classification in the ... We can also use this transformer for multiclass labelling and in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found