mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-08 22:35:09 +00:00
Use @property
This commit is contained in:
@@ -4700,5 +4700,6 @@ class LossRecorder:
|
||||
self.loss_list[step] = loss
|
||||
self.loss_total += loss
|
||||
|
||||
def get_moving_average(self) -> float:
|
||||
@property
|
||||
def moving_average(self) -> float:
|
||||
return self.loss_total / len(self.loss_list)
|
||||
|
||||
Reference in New Issue
Block a user