(batched_states, i)
return tf.nest.map_structure(lambda x: x[i], batched_states)
Extracts a single state from a batch of states.

  Args:
    batched_states: A nested structure with entries whose first dimensions all
      equal N.
    i: The index of the state to extract.

  Returns:
    A tuple containing tensors (or tuples of tensors) of the same structure as
    rnn_nade_state, but containing only the state values that represent the
    state at index i. The tensors will now have the shape (1, N).
Extracts a single state from a batch of states.
Extracts a single state from a batch of states .
def extract_state(batched_states, i):
  """Extracts a single state from a batch of states.

  Args:
    batched_states: A nested structure with entries whose first dimensions all
      equal N.
    i: The index of the state to extract.

  Returns:
    A tuple containing tensors (or tuples of tensors) of the same structure as
    rnn_nade_state, but containing only the state values that represent the
    state at index i. The tensors will now have the shape (1, N).
  """
  return tf.nest.map_structure(lambda x: x[i], batched_states)
def extract_state ( batched_states , i ) : return tf . nest . map_structure ( lambda x : x [ i ] , batched_states )