MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _reset

Method _reset

tensorflow/python/keras/callbacks.py:1864–1879  ·  view source on GitHub ↗

Resets wait counter and cooldown counter.

(self)

Source from the content-addressed store, hash-verified

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()

Callers 2

__init__Method · 0.95
on_train_beginMethod · 0.95

Calls 1

greaterMethod · 0.80

Tested by

no test coverage detected