Resets wait counter and cooldown counter.
(self)
| 1862 | self._reset() |
| 1863 | |
| 1864 | def _reset(self): |
| 1865 | """Resets wait counter and cooldown counter. |
| 1866 | """ |
| 1867 | if self.mode not in ['auto', 'min', 'max']: |
| 1868 | logging.warning('Learning Rate Plateau Reducing mode %s is unknown, ' |
| 1869 | 'fallback to auto mode.', self.mode) |
| 1870 | self.mode = 'auto' |
| 1871 | if (self.mode == 'min' or |
| 1872 | (self.mode == 'auto' and 'acc' not in self.monitor)): |
| 1873 | self.monitor_op = lambda a, b: np.less(a, b - self.min_delta) |
| 1874 | self.best = np.Inf |
| 1875 | else: |
| 1876 | self.monitor_op = lambda a, b: np.greater(a, b + self.min_delta) |
| 1877 | self.best = -np.Inf |
| 1878 | self.cooldown_counter = 0 |
| 1879 | self.wait = 0 |
| 1880 | |
| 1881 | def on_train_begin(self, logs=None): |
| 1882 | self._reset() |
no test coverage detected