def __init__(self,
               save_path=None,
               logdir=None,
               restore=True,
               coord=None,
               initial_checkpoint=None,
               follower=False):
    """Create a Runner object that checkpoints to the given path.

    Args:
      save_path: The path to checkpoint or None for no checkpoints.
      logdir: Directory for writing summaries.  If None, then defaults to the
        directory of save_path.
      restore: If False, disable restoring the model (force a fresh run).
      coord: The coordinator to use for threads.
      initial_checkpoint: If not None, restore from the given checkpoint instead
        of starting fresh.
      follower: True to make this wait for another session.
    """
    self._restore = restore
    self._save_path = save_path
    self._var_count = 0
    self._initial_checkpoint = initial_checkpoint

    # Used primarily for testing.
    self._last_init = None
    self._last_restore = None
    if self._save_path:
      self._logdir = logdir if logdir else os.path.dirname(self._save_path)
      self._summary_writer = tf.summary.FileWriter(self._logdir)
    else:
      self._logdir = logdir
      self._summary_writer = None
    self._create_initializers()
    self._test_vars = None
    if coord:
      self._coord = coord
    else:
      self._coord = tf.train.Coordinator()
    self._qr2threads = {}
    self._sess = None
    self._follower = follower
def __init__ ( self , save_path = None , logdir = None , restore = True , coord = None , initial_checkpoint = None , follower = False ) : self . _restore = restore self . _save_path = save_path self . _var_count = 0 self . _initial_checkpoint = initial_checkpoint self . _last_init = None self . _last_restore = None if self . _save_path : self . _logdir = logdir if logdir else os . path . dirname ( self . _save_path ) self . _summary_writer = tf . summary . FileWriter ( self . _logdir ) else : self . _logdir = logdir self . _summary_writer = None self . _create_initializers ( ) self . _test_vars = None if coord : self . _coord = coord else : self . _coord = tf . train . Coordinator ( ) self . _qr2threads = { } self . _sess = None self . _follower = follower
Create a Runner object that checkpoints to the given path.

    Args:
      save_path: The path to checkpoint or None for no checkpoints.
      logdir: Directory for writing summaries.  If None, then defaults to the
        directory of save_path.
      restore: If False, disable restoring the model (force a fresh run).
      coord: The coordinator to use for threads.
      initial_checkpoint: If not None, restore from the given checkpoint instead
        of starting fresh.
      follower: True to make this wait for another session.