Spaces:
Sleeping
Sleeping
update
Browse files- top5_error_rate.py +2 -4
top5_error_rate.py
CHANGED
@@ -17,7 +17,7 @@ Top-5 Error Rate = (Number of incorrect top-5 predictions) / (Total number of ca
|
|
17 |
|
18 |
_KWARGS_DESCRIPTION = """
|
19 |
Args:
|
20 |
-
predictions (`list` of `int`): Predicted labels.
|
21 |
references (`list` of `int`): Ground truth labels.
|
22 |
Returns:
|
23 |
accuracy (`float` or `int`): Accuracy score. Minimum possible value is 0. Maximum possible value is 1.0, or the number of examples input.
|
@@ -42,9 +42,7 @@ class Top5ErrorRate(evaluate.Metric):
|
|
42 |
inputs_description=_KWARGS_DESCRIPTION,
|
43 |
features=datasets.Features(
|
44 |
{
|
45 |
-
"predictions": datasets.Sequence(
|
46 |
-
datasets.Sequence(datasets.Value("int32"))
|
47 |
-
),
|
48 |
"references": datasets.Sequence(datasets.Value("int32")),
|
49 |
}
|
50 |
if self.config_name == "multilabel"
|
|
|
17 |
|
18 |
_KWARGS_DESCRIPTION = """
|
19 |
Args:
|
20 |
+
predictions (`list` of `list` of `int`): Predicted labels.
|
21 |
references (`list` of `int`): Ground truth labels.
|
22 |
Returns:
|
23 |
accuracy (`float` or `int`): Accuracy score. Minimum possible value is 0. Maximum possible value is 1.0, or the number of examples input.
|
|
|
42 |
inputs_description=_KWARGS_DESCRIPTION,
|
43 |
features=datasets.Features(
|
44 |
{
|
45 |
+
"predictions": datasets.Sequence(list[datasets.Value("int32")]),
|
|
|
|
|
46 |
"references": datasets.Sequence(datasets.Value("int32")),
|
47 |
}
|
48 |
if self.config_name == "multilabel"
|