class_docstr: An encoder-decoder T2TModel that uses NeuralStackCells.
    
class_docstr_tok: ["An","encoder-decoder","T2TModel","that","uses","NeuralStackCells","."]
docstr: A helper method to build tf.nn.dynamic_rnn.
  
  Args:
    inputs: The inputs to the RNN. A tensor of shape
            [batch_size, max_seq_length, embedding_size]
    name: A namespace for the RNN.
    initial_state: An optional initial state for the RNN.
    sequence_length: An optional sequence length for the RNN.
  
  Returns:
    A tf.nn.dynamic_rnn operator.
docstr_tok: ["A","helper","method","to","build","tf.nn.dynamic_rnn",".","Args",":","inputs",":","The","inputs","to","the","RNN",".","A","tensor","of","shape","[","batch_size",",","max_seq_length",",","embedding_size","]","name",":","A","namespace","for","the","RNN",".","initial_state",":","An","optional","initial","state","for","the","RNN",".","sequence_length",":","An","optional","sequence","length","for","the","RNN",".","Returns",":","A","tf.nn.dynamic_rnn","operator","."]
code: def _rnn(
      self, inputs, name, initial_state=None, sequence_length=None
  ):
      """A helper method to build tf.nn.dynamic_rnn.
  
      Args:
        inputs: The inputs to the RNN. A tensor of shape
                [batch_size, max_seq_length, embedding_size]
        name: A namespace for the RNN.
        initial_state: An optional initial state for the RNN.
        sequence_length: An optional sequence length for the RNN.
  
      Returns:
        A tf.nn.dynamic_rnn operator.
      """
      layers = [
          self.cell(layer_size)
          for layer_size in self._hparams.controller_layer_sizes
      ]
      with tf.variable_scope(name):
          return tf.nn.dynamic_rnn(
              contrib.rnn().MultiRNNCell(layers),
              inputs,
              initial_state=initial_state,
              sequence_length=sequence_length,
              dtype=tf.float32,
              time_major=False,
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  from tensor2tensor.layers import common_hparams
  from tensor2tensor.layers import common_layers
  from tensor2tensor.utils import contrib
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import t2t_model
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling the NeuralStackModel obj's underlying member method code with example usage: obj._rnn(inputs, name, initial_state, sequence_length) and returns: tf