i want to ask question about dice.py #1689
-
|
average: if average not in ["micro", "macro", "samples"]:
raise ValueError(f"The `reduce` {average} is not valid.")i used None to get a list including all classes dice, but raise a error. In the exegesis, You can pass in the parameter None. how i to do to get each classes dice? rewrite Dice? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Setting pip install --upgrade torchmetricsCheck input shapes and types match expected formats. Rewriting |
Beta Was this translation helpful? Give feedback.
Setting
average=Nonein TorchMetrics’Dicemetric should return per-class scores as per the docs. If this causes errors, it’s likely due to an outdated version or input format issues.Make sure to update to the latest TorchMetrics version via:
Check input shapes and types match expected formats. Rewriting
Diceis usually unnecessary sinceaverage=Noneis supported to get class-wise metrics. If problems persist, consider opening an issue with a reproducible example for help.