(self)
Returns the initial output and initial state.

    Returns:
      A tuple of (`StepOutput`, environment state). The environment state should
      be passed in to the next invocation of `step` and should not be used in
      any other way. The reward and transition type in the `StepOutput` is the
      reward/transition type that lead to the observation in `StepOutput`.
Returns the initial output and initial state.
Returns the initial output and initial state .
def initial(self):
    """Returns the initial output and initial state.

    Returns:
      A tuple of (`StepOutput`, environment state). The environment state should
      be passed in to the next invocation of `step` and should not be used in
      any other way. The reward and transition type in the `StepOutput` is the
      reward/transition type that lead to the observation in `StepOutput`.
    """
    with tf.name_scope('flow_environment_initial'):
      initial_reward = tf.constant(0.)
      initial_info = StepOutputInfo(tf.constant(0.), tf.constant(0))
      initial_done = tf.constant(True)
      initial_observation = self._env.initial()

      initial_output = StepOutput(
          initial_reward,
          initial_info,
          initial_done,
          initial_observation)

      # Control dependency to make sure the next step can't be taken before the
      # initial output has been read from the environment.
      with tf.control_dependencies(nest.flatten(initial_output)):
        initial_flow = tf.constant(0, dtype=tf.int64)
      initial_state = (initial_flow, initial_info)
      return initial_output, initial_state
def initial ( self ) : with tf . name_scope ( 'flow_environment_initial' ) : initial_reward = tf . constant ( 0. ) initial_info = StepOutputInfo ( tf . constant ( 0. ) , tf . constant ( 0 ) ) initial_done = tf . constant ( True ) initial_observation = self . _env . initial ( ) initial_output = StepOutput ( initial_reward , initial_info , initial_done , initial_observation ) # Control dependency to make sure the next step can't be taken before the # initial output has been read from the environment. with tf . control_dependencies ( nest . flatten ( initial_output ) ) : initial_flow = tf . constant ( 0 , dtype = tf . int64 ) initial_state = ( initial_flow , initial_info ) return initial_output , initial_state