MCPcopy Create free account
hub / github.com/TorchSSL/TorchSSL / update

Method update

train_utils.py:181–185  ·  view source on GitHub ↗
(self, val, n=1)

Source from the content-addressed store, hash-verified

179 self.count = 0
180
181 def update(self, val, n=1):
182 self.val = val
183 self.sum += val * n
184 self.count += n
185 self.avg = self.sum / self.count
186
187
188def wd_loss(net):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected