class_docstr: Early stopping for deep model training
class_docstr_tok: ["Early","stopping","for","deep","model","training"]
docstr: :param patience: Number of epochs with no improvement after which training will be stopped.
  :param delta: Minimum change in the monitored quantity to qualify as an improvement,
      i.e. an absolute change of less than min_delta, will count as no improvement.
docstr_tok: [":","param","patience",":","Number","of","epochs","with","no","improvement","after","which","training","will","be","stopped",".",":","param","delta",":","Minimum","change","in","the","monitored","quantity","to","qualify","as","an","improvement",",","i.e",".","an","absolute","change","of","less","than","min_delta",",","will","count","as","no","improvement","."]
code: def __init__(self, patience=7, delta=0):
      """
      :param patience: Number of epochs with no improvement after which training will be stopped.
      :param delta: Minimum change in the monitored quantity to qualify as an improvement,
          i.e. an absolute change of less than min_delta, will count as no improvement.
      """
  
      self.patience = patience
      self.counter = 0
      self.best_score = None
      self.early_stop = False
      self.val_loss_min = np.Inf
      self.delta = delta
      self.best_model_state_dict = None
  
imports: import logging
  import numpy
label_desc: Use image node_id 1 to create a new EarlyStopping object  with example: obj = EarlyStopping(patience, delta)