class_docstr: Early stopping on plateau helper.
  
  Parameters
  ----------
  patience : int, default is -1
      How many epochs with no improvement after which train will be early stopped.
      Negative patience means infinite petience.
  metric_fn : function, default is None
      The function to apply to metric value if any. For example, you can use
      the `metric_fn` to cast loss to negative values where lower loss is better.
      `min_delta`, `baseline_value` and `max_value` are all based on output of `metric_fn`.
  min_delta : float, default is 1e-4
      Early stopper ignores changes less than `min_delta` for metrics to ignore tiny fluctuates.
  baseline_value : float, default is 0.0
      The baseline metric value to be considered.
  max_value : float, default is 1.0
      Instantly early stop if reaching max value.
code: def __init__(
      self,
      patience=10,
      metric_fn=None,
      min_delta=1e-4,
      baseline_value=None,
      max_value=np.Inf,
  ):
      self.patience = patience if patience > 0 else np.Inf
      self.metric_fn = metric_fn
      self.min_delta = np.abs(min_delta)
      self.baseline_value = baseline_value
      self.max_value = max_value
      self.reset()
  
file_path: gluon-cv/gluoncv/auto/estimators/utils.py
imports: import numpy
label_desc: Use image node_id 1 to create a new EarlyStopperOnPlateau object  with example: obj = EarlyStopperOnPlateau(patience, metric_fn, min_delta, baseline_value, max_value)