MCPcopy Create free account
hub / github.com/10Ring/LAA-Net / update

Method update

lib/core_function.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 if self.count != 0 else 0
30
31
32def get_batch_data(batch_data):

Callers 3

trainFunction · 0.95
validateFunction · 0.95
test.pyFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected