MCPcopy
hub / github.com/xingyizhou/CenterNet / update

Method update

src/lib/utils/utils.py:18–23  ·  view source on GitHub ↗
(self, val, n=1)

Source from the content-addressed store, hash-verified

16 self.count = 0
17
18 def update(self, val, n=1):
19 self.val = val
20 self.sum += val * n
21 self.count += n
22 if self.count > 0:
23 self.avg = self.sum / self.count

Callers 8

prefetch_testFunction · 0.80
testFunction · 0.80
run_epochMethod · 0.80
__getitem__Method · 0.80
__getitem__Method · 0.80
__getitem__Method · 0.80
__getitem__Method · 0.80

Calls

no outgoing calls

Tested by 2

prefetch_testFunction · 0.64
testFunction · 0.64