(self)
| 389 | self._loss_counts[t] += 1 |
| 390 | |
| 391 | def weights(self): |
| 392 | if not self._warmed_up(): |
| 393 | return np.ones([self.num_steps], dtype=np.float64) |
| 394 | weights = np.sqrt(np.mean(self._loss_history ** 2, axis=-1)) |
| 395 | weights /= np.sum(weights) |
| 396 | weights *= 0.999 |
| 397 | weights += 0.001 / len(weights) |
| 398 | return weights |
| 399 | |
| 400 | def _warmed_up(self): |
| 401 | return (self._loss_counts == self.history_per_term).all() |
nothing calls this directly
no test coverage detected