MCPcopy
hub / github.com/kohya-ss/sd-scripts / add

Method add

library/logging_util.py:62–70  ·  view source on GitHub ↗
(self, *, epoch: int, step: int, loss: float)

Source from the content-addressed store, hash-verified

60 self.loss_total: float = 0.0
61
62 def add(self, *, epoch: int, step: int, loss: float) -> None:
63 if epoch == 0:
64 self.loss_list.append(loss)
65 else:
66 while len(self.loss_list) <= step:
67 self.loss_list.append(0.0)
68 self.loss_total -= self.loss_list[step]
69 self.loss_list[step] = loss
70 self.loss_total += loss
71
72 @property
73 def moving_average(self) -> float:

Callers 15

trainFunction · 0.95
trainFunction · 0.95
trainFunction · 0.95
trainFunction · 0.95
trainFunction · 0.95
trainFunction · 0.95
trainFunction · 0.95
trainFunction · 0.95
trainFunction · 0.95
trainFunction · 0.95
trainMethod · 0.95
trainFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected