MCPcopy Create free account
hub / github.com/aigc3d/LHM / update

Method update

engine/BiRefNet/utils.py:75–79  ·  view source on GitHub ↗
(self, val, n=1)

Source from the content-addressed store, hash-verified

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

Callers 2

_train_batchMethod · 0.45
load_weightsFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected