MCPcopy Create free account
hub / github.com/TPCD/DCCL / update

Method update

project_utils/general_utils.py:24–29  ·  view source on GitHub ↗
(self, val, n=1)

Source from the content-addressed store, hash-verified

22 self.count = 0
23
24 def update(self, val, n=1):
25
26 self.val = val
27 self.sum += val * n
28 self.count += n
29 self.avg = self.sum / self.count
30
31
32def seed_torch(seed=1029):

Callers 7

trainFunction · 0.95
extract_featuresFunction · 0.95
extract_features2Function · 0.95
trainFunction · 0.95
visualizeFunction · 0.45
visualize2Function · 0.45
visualize3Function · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected