class_docstr: EarlyStopping class to keep NN from overfitting
      
code: def __init__(
      self, mode="min", min_delta=0, patience=10, percentage=False
  ):
      self.mode = mode
      self.min_delta = min_delta
      self.patience = patience
      self.best = None
      self.num_bad_epochs = 0
      self.is_better = None
      self._init_is_better(mode, min_delta, percentage)
  
      if patience == 0:
          self.is_better = lambda a, b: True
          self.step = lambda a: False
  
file_path: nni/examples/trials/network_morphism/FashionMNIST/utils.py
imports: import numpy
  import torch
  import torch.nn
  import torch.nn.init
  import torchvision.transforms
label_desc: Use image node_id 1 to create a new EarlyStopping object  with example: obj = EarlyStopping(mode, min_delta, patience, percentage)