MCPcopy Create free account
hub / github.com/Closed11/Unsupervised-Image-Classification / update

Method update

UIC/util.py:16–20  ·  view source on GitHub ↗
(self, val, n=1)

Source from the content-addressed store, hash-verified

14 self.count = 0
15
16 def update(self, val, n=1):
17 self.val = val
18 self.sum += val * n
19 self.count += n
20 self.avg = self.sum / self.count
21
22class LogFormatter():
23 def __init__(self):

Callers 4

trainFunction · 0.95
validateFunction · 0.95
trainFunction · 0.95
compute_labelsFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected