This commit is contained in:
D-X-Y
2021-04-26 21:44:03 +08:00
parent 8358d71cdf
commit d3371296a7
10 changed files with 270 additions and 264 deletions

View File

@@ -3,6 +3,7 @@
#####################################################
import abc
def obtain_accuracy(output, target, topk=(1,)):
"""Computes the precision@k for the specified values of k"""
maxk = max(topk)
@@ -20,7 +21,6 @@ def obtain_accuracy(output, target, topk=(1,)):
class EvaluationMetric(abc.ABC):
def __init__(self):
self._total_metrics = 0