code: def __init__(
      self,
      every_n_steps=None,
      every_n_secs=None,
      mode=None,
      output_dir=None,
      vars_summary=None,
  ):
      super(VarVisHook, self).__init__()
  
      if (every_n_secs is None) == (every_n_steps is None):
          raise ValueError(
              'Only one of "every_n_secs" and "every_n_steps" must be '
              "provided."
          )
  
      if output_dir is None:
          tf.logging.warning(
              "`output_dir` not provided, VarVisHook is not saving "
              "summaries."
          )
  
      self._timer = tf.train.SecondOrStepTimer(
          every_steps=every_n_steps, every_secs=every_n_secs
      )
  
      self._mode = mode
      self._output_dir = output_dir
      self._summary_writer = None
      self._vars_summary = vars_summary
  
      tf.logging.info(
          'VarVisHook was created with mode = "{}"'.format(mode)
      )
  
file_path: luminoth/luminoth/utils/hooks/var_vis_hook.py
imports: import tensorflow
  from tensorflow.python.training.summary_io import SummaryWriterCache
label_desc: Use image node_id 1 to create a new VarVisHook object from inherited base classes: tf.train with example: obj = VarVisHook(every_n_steps, every_n_secs, mode, output_dir, vars_summary)