Skip to content
Snippets Groups Projects
Commit 7e9fc986 authored by Bobholamovic's avatar Bobholamovic
Browse files

Fix confusion matrix isn't reset

parent 37067fad
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,11 @@ class AverageMeter:
self.sum = 0
self.count = 0
for attr in filter(lambda a: not a.startswith('__'), dir(self)):
obj = getattr(self, attr)
if isinstance(obj, AverageMeter):
AverageMeter.reset(obj)
def update(self, *args, n=1):
self.val = self.compute(*args)
self.sum += self.val * n
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment