class_docstr: Stop training when the loss is at its min, i.e. the loss stops decreasing.
  
  Arguments:
      patience: Number of epochs to wait after min has been hit. After this
      number of no improvement, training stops.
class_docstr_tok: ["Stop","training","when","the","loss","is","at","its","min",",","i.e",".","the","loss","stops","decreasing",".","Arguments",":","patience",":","Number","of","epochs","to","wait","after","min","has","been","hit",".","After","this","number","of","no","improvement",",","training","stops","."]
code: def on_epoch_end(self, epoch, logs=None):
      current = logs.get("loss")
      if np.less(current, self.best):
          self.best = current
          self.wait = 0
          # Record the best weights if current results is better (less).
          self.best_weights = self.model.get_weights()
      else:
          self.wait += 1
          if self.wait >= self.patience:
              self.stopped_epoch = epoch
              self.model.stop_training = True
              print(
                  "Restoring model weights from the end of the best epoch."
              )
              self.model.set_weights(self.best_weights)
  
imports: import numpy
  import keras
label_desc: Use image node_id 3 for calling the EarlyStoppingAtMinLoss obj's underlying member method code with example usage: obj.on_epoch_end(epoch, logs) without return types