(self, *, epoch: int, step: int, loss: float)
| 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: |
no outgoing calls
no test coverage detected