parameters: (inputs, noutput, scope=None, name=None, reverse=False)
docstring: Run an LSTM across all steps and returns only the final state.
  
    Args:
      inputs: (length, batch_size, depth) tensor
      noutput: size of output vector
      scope: optional scope name
      name: optional name for output tensor
      reverse: run in reverse
  
    Returns:
      Batch of size (batch_size, noutput).
docstring_summary: Run an LSTM across all steps and returns only the final state.
docstring_tokens: Run an LSTM across all steps and returns only the final state .
function: def sequence_to_final(inputs, noutput, scope=None, name=None, reverse=False):
    """Run an LSTM across all steps and returns only the final state.
  
    Args:
      inputs: (length, batch_size, depth) tensor
      noutput: size of output vector
      scope: optional scope name
      name: optional name for output tensor
      reverse: run in reverse
  
    Returns:
      Batch of size (batch_size, noutput).
    """
    with tf.variable_scope(scope, "SequenceToFinal", [inputs]):
      length, batch_size, _ = _shape(inputs)
      lstm = tf.nn.rnn_cell.BasicLSTMCell(noutput, state_is_tuple=False)
      state = tf.zeros([batch_size, lstm.state_size])
      inputs_u = tf.unpack(inputs)
      if reverse:
        inputs_u = list(reversed(inputs_u))
      for i in xrange(length):
        if i > 0:
          tf.get_variable_scope().reuse_variables()
        output, state = lstm(inputs_u[i], state)
      outputs = tf.reshape(output, [batch_size, noutput], name=name)
      return outputs
function_tokens: def sequence_to_final ( inputs , noutput , scope = None , name = None , reverse = False ) : with tf . variable_scope ( scope , "SequenceToFinal" , [ inputs ] ) : length , batch_size , _ = _shape ( inputs ) lstm = tf . nn . rnn_cell . BasicLSTMCell ( noutput , state_is_tuple = False ) state = tf . zeros ( [ batch_size , lstm . state_size ] ) inputs_u = tf . unpack ( inputs ) if reverse : inputs_u = list ( reversed ( inputs_u ) ) for i in xrange ( length ) : if i > 0 : tf . get_variable_scope ( ) . reuse_variables ( ) output , state = lstm ( inputs_u [ i ] , state ) outputs = tf . reshape ( output , [ batch_size , noutput ] , name = name ) return outputs