Method
__init__
(self,
monitor='val_loss',
factor=0.1,
patience=10,
verbose=0,
mode='auto',
min_delta=1e-4,
cooldown=0,
min_lr=0,
**kwargs)
Source from the content-addressed store, hash-verified
| 1830 | """ |
| 1831 | |
| 1832 | def __init__(self, |
| 1833 | monitor='val_loss', |
| 1834 | factor=0.1, |
| 1835 | patience=10, |
| 1836 | verbose=0, |
| 1837 | mode='auto', |
| 1838 | min_delta=1e-4, |
| 1839 | cooldown=0, |
| 1840 | min_lr=0, |
| 1841 | **kwargs): |
| 1842 | super(ReduceLROnPlateau, self).__init__() |
| 1843 | |
| 1844 | self.monitor = monitor |
| 1845 | if factor >= 1.0: |
| 1846 | raise ValueError('ReduceLROnPlateau ' 'does not support a factor >= 1.0.') |
| 1847 | if 'epsilon' in kwargs: |
| 1848 | min_delta = kwargs.pop('epsilon') |
| 1849 | logging.warning('`epsilon` argument is deprecated and ' |
| 1850 | 'will be removed, use `min_delta` instead.') |
| 1851 | self.factor = factor |
| 1852 | self.min_lr = min_lr |
| 1853 | self.min_delta = min_delta |
| 1854 | self.patience = patience |
| 1855 | self.verbose = verbose |
| 1856 | self.cooldown = cooldown |
| 1857 | self.cooldown_counter = 0 # Cooldown counter. |
| 1858 | self.wait = 0 |
| 1859 | self.best = 0 |
| 1860 | self.mode = mode |
| 1861 | self.monitor_op = None |
| 1862 | self._reset() |
| 1863 | |
| 1864 | def _reset(self): |
| 1865 | """Resets wait counter and cooldown counter. |
Callers
nothing calls this directly
Tested by
no test coverage detected