Пример #1
0
  def __init__(self, sess, coord, coordinated_threads_to_join):
    """Create a new `CoordinatedSession`.

    Args:
      sess: A `tf.Session` object.  The wrapped session.
      coord: A `tf.train.Coordinator` object.
      coordinated_threads_to_join: A list of threads.
    """
    WrappedSession.__init__(self, sess)
    self._coord = coord
    self._coordinated_threads_to_join = coordinated_threads_to_join
Пример #2
0
    def __init__(self, sess, coord, coordinated_threads_to_join):
        """Create a new `CoordinatedSession`.

    Args:
      sess: A `tf.Session` object.  The wrapped session.
      coord: A `tf.train.Coordinator` object.
      coordinated_threads_to_join: A list of threads.
    """
        WrappedSession.__init__(self, sess)
        self._coord = coord
        self._coordinated_threads_to_join = coordinated_threads_to_join
Пример #3
0
    def __init__(self, sess_factory):
        """Create a new `RecoverableSession`.

    The value returned by calling `sess_factory()` will be the
    session wrapped by this recoverable session.

    Args:
      sess_factory: A callable with no arguments that returns a
        `tf.Session` when called.
    """
        self._factory = sess_factory
        WrappedSession.__init__(self, sess_factory())
    def __init__(self, sess_factory):
        """Create a new `RecoverableSession`.

    The value returned by calling `sess_factory()` will be the
    session wrapped by this recoverable session.

    Args:
      sess_factory: A callable with no arguments that returns a
        `tf.Session` when called.
    """
        self._factory = sess_factory
        WrappedSession.__init__(self, sess_factory())
Пример #5
0
    def __init__(self, sess, monitors, global_step_tensor):
        """Initializes a MonitoredSession object.

    Args:
      sess: A `tf.Session` or a `WrappedSession` object.
      monitors: An iterable of `tf.contrib.learn.BaseMonitor' objects.
      global_step_tensor: A 'Tensor' which holds a scalar int value.
    """

        WrappedSession.__init__(self, sess)
        self._monitors = monitors
        self._should_stop = False
        self._global_step_tensor = global_step_tensor
        self._last_step = None
Пример #6
0
  def __init__(self, sess, monitors, global_step_tensor):
    """Initializes a MonitoredSession object.

    Args:
      sess: A `tf.Session` or a `WrappedSession` object.
      monitors: An iterable of `tf.contrib.learn.BaseMonitor' objects.
      global_step_tensor: A 'Tensor' which holds a scalar int value.
    """

    WrappedSession.__init__(self, sess)
    self._monitors = monitors
    self._should_stop = False
    self._global_step_tensor = global_step_tensor
    self._last_step = None
 def __init__(self, sess):
     WrappedSession.__init__(self, sess)
     self.args_called = {}
 def __init__(self, sess):
     WrappedSession.__init__(self, sess)
     self.args_called = {}