MCPcopy Create free account
hub / github.com/ZhengPeng7/BiRefNet / update

Method update

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

Source from the content-addressed store, hash-verified

71 self.count = 0.0
72
73 def update(self, val, n=1):
74 self.val = val
75 self.sum += val * n
76 self.count += n
77 self.avg = self.sum / self.count
78
79
80def save_checkpoint(state, path, filename="latest.pth"):

Callers 2

_train_batchMethod · 0.80
load_weightsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected