class_docstr: EarlyStoppingHook will stop training when a given metric has plateaued.
docstr: Create an EarlyStoppingHook.
  
  This hook will stop training when the metric identified by tag has
  plateaued. Plateaued is defined by the metric having stopped
  increasing/decreasing (based on plateau_decrease) by plateau_delta for
  num_plateau_steps.
  
  Args:
    events_dir: Directory with events files.
    tag: Name of metric in TensorBoard.
    num_plateau_steps: Number of steps over which to check the plateau.
    plateau_delta: delta to define a "plateau".
    plateau_decrease: whether to check decrease or increase in the metric.
    every_n_steps: how often to run this hook.
  
  Returns:
    An instance of EarlyStoppingHook.
docstr_tok: ["Create","an","EarlyStoppingHook",".","This","hook","will","stop","training","when","the","metric","identified","by","tag","has","plateaued",".","Plateaued","is","defined","by","the","metric","having","stopped","increasing\/decreasing","(","based","on","plateau_decrease",")","by","plateau_delta","for","num_plateau_steps",".","Args",":","events_dir",":","Directory","with","events","files",".","tag",":","Name","of","metric","in","TensorBoard",".","num_plateau_steps",":","Number","of","steps","over","which","to","check","the","plateau",".","plateau_delta",":","delta","to","define","a","``","plateau","''",".","plateau_decrease",":","whether","to","check","decrease","or","increase","in","the","metric",".","every_n_steps",":","how","often","to","run","this","hook",".","Returns",":","An","instance","of","EarlyStoppingHook","."]
code: def __init__(
      self,
      events_dir,
      tag,
      num_plateau_steps=1000,
      plateau_delta=0.1,
      plateau_decrease=True,
      every_n_steps=1000,
  ):
      """Create an EarlyStoppingHook.
  
      This hook will stop training when the metric identified by tag has
      plateaued. Plateaued is defined by the metric having stopped
      increasing/decreasing (based on plateau_decrease) by plateau_delta for
      num_plateau_steps.
  
      Args:
        events_dir: Directory with events files.
        tag: Name of metric in TensorBoard.
        num_plateau_steps: Number of steps over which to check the plateau.
        plateau_delta: delta to define a "plateau".
        plateau_decrease: whether to check decrease or increase in the metric.
        every_n_steps: how often to run this hook.
  
      Returns:
        An instance of EarlyStoppingHook.
      """
      super(EarlyStoppingHook, self).__init__(
          events_dir=events_dir, tags=[tag], every_n_steps=every_n_steps
      )
      self._num_plateau_steps = num_plateau_steps
      self._plateau_delta = plateau_delta
      self._plateau_decrease = plateau_decrease
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import tensorflow.compat.v1
  from tensorboard.backend.event_processing import event_accumulator
  from tensorboard.backend.event_processing import event_multiplexer
label_desc: Use image node_id 1 to create a new EarlyStoppingHook object from inherited base classes: MetricsBasedHook with example: obj = EarlyStoppingHook(events_dir, tag, num_plateau_steps, plateau_delta, plateau_decrease, every_n_steps)