Merge pull request #300 from tmkkk/real-labels-fix

Fix a bug with accuracy retrieving from RealLabels
pull/290/merge
Ross Wightman 4 years ago committed by GitHub
commit c9ebe86d03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -37,6 +37,6 @@ class RealLabelsImagenet:
def get_accuracy(self, k=None): def get_accuracy(self, k=None):
if k is None: if k is None:
return {k: float(np.mean(self.is_correct[k] for k in self.topk))} return {k: float(np.mean(self.is_correct[k])) * 100 for k in self.topk}
else: else:
return float(np.mean(self.is_correct[k])) * 100 return float(np.mean(self.is_correct[k])) * 100

Loading…
Cancel
Save