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

Problem with auroc classifier constructor #3

Open
ahmadalghadban opened this issue Jun 29, 2023 · 0 comments
Open

Problem with auroc classifier constructor #3

ahmadalghadban opened this issue Jun 29, 2023 · 0 comments

Comments

@ahmadalghadban
Copy link

I got the following error when running train.py

Traceback (most recent call last):
  File "c:\Users\USER\speaker-change-detection\train.py", line 24, in <module>
    model = SSCDModel(batch_size=BATCH_SIZE, scd=DO_SCD, use_transformer=False)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\USER\speaker-change-detection\model.py", line 94, in __init__
    AUROC(
  File "C:\Users\USER\AppData\Local\Programs\Python\Python311\Lib\site-packages\torchmetrics\classification\auroc.py", line 370, in __new__
    raise ValueError(
ValueError: Expected argument `task` to either be `'binary'`, `'multiclass'` or `'multilabel'` but got 293

When clicking on the error line I found the following code:

AUROC(
                    self.num_frames if self.scd else self.num_classes,
                    pos_label=1,
                    average="macro",
                    compute_on_step=False,
                ),

and the AUROC constructor requires 'task' parameter which must be one of ["binary", "multiclass", "multilabel"]

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