Ejemplo n.º 1
0
 def __init__(self, monitor="acc", patience=10, verbose=0, desired="high"):
     EarlyStopping.__init__(self, monitor=monitor, patience=patience, verbose=verbose)
     self.logs = {}
     if desired == "high":
         self.check_improved = lambda new, old: new > old
         self.best = -self.best
     else:
         self.check_improved = lambda new, old: new < old
Ejemplo n.º 2
0
 def __init__(self,
              monitor='val_loss',
              comparison_monitor="loss",
              max_percent_diff=.1,
              patience=0,
              verbose=0,
              mode='auto'):
     self.comparison_monitor = comparison_monitor
     self.max_percent_diff = max_percent_diff
     EarlyStopping.__init__(self,
                            monitor,
                            patience=patience,
                            verbose=verbose,
                            mode=mode)
Ejemplo n.º 3
0
    def __init__(self,
                 monitor='val_loss',
                 min_delta=0,
                 patience=0,
                 verbose=0,
                 avgsteps=10,
                 mode='auto'):

        EarlyStopping.__init__(self,
                               monitor='val_loss',
                               min_delta=min_delta,
                               patience=patience,
                               verbose=verbose,
                               mode='auto')

        self.avgsteps = avgsteps
        self.monitors = deque([])
Ejemplo n.º 4
0
 def __init__(self, min_loss):
     # Hard coded values. Go directly to Jail. Do not pass go...
     EarlyStopping.__init__(self, 'loss', 0.000001, 100)
     self.min_loss = min_loss
     self.best = 0