MCPcopy
hub / github.com/DingXiaoH/RepVGG / update

Method update

utils.py:25–29  ·  view source on GitHub ↗
(self, val, n=1)

Source from the content-addressed store, hash-verified

23 self.count = 0
24
25 def update(self, val, n=1):
26 self.val = val
27 self.sum += val * n
28 self.count += n
29 self.avg = self.sum / self.count
30
31 def __str__(self):
32 fmtstr = '{name} {val' + self.fmt + '} ({avg' + self.fmt + '})'

Callers 5

train_one_epochFunction · 0.95
validateFunction · 0.95
insert_bnFunction · 0.95
trainFunction · 0.95
validateFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected