class_docstr: Extends the Tensorflow MultiRNNCell with residual connections
class_docstr_tok: ["Extends","the","Tensorflow","MultiRNNCell","with","residual","connections"]
docstr: Create a RNN cell composed sequentially of a number of RNNCells.
  
  Args:
    cells: list of RNNCells that will be composed in this order.
    state_is_tuple: If True, accepted and returned states are n-tuples, where
      `n = len(cells)`.  If False, the states are all
      concatenated along the column axis.  This latter behavior will soon be
      deprecated.
    residual_connections: If true, add residual connections between all cells.
      This requires all cells to have the same output_size. Also, iff the
      input size is not equal to the cell output size, a linear transform
      is added before the first layer.
    residual_combiner: One of "add" or "concat". To create inputs for layer
      t+1 either "add" the inputs from the prev layer or concat them.
    residual_dense: Densely connect each layer to all other layers
  
  Raises:
    ValueError: if cells is empty (not allowed), or at least one of the cells
      returns a state tuple but the flag `state_is_tuple` is `False`.
docstr_tok: ["Create","a","RNN","cell","composed","sequentially","of","a","number","of","RNNCells",".","Args",":","cells",":","list","of","RNNCells","that","will","be","composed","in","this","order",".","state_is_tuple",":","If","True",",","accepted","and","returned","states","are","n-tuples",",","where","`","n","=","len","(","cells",")","`",".","If","False",",","the","states","are","all","concatenated","along","the","column","axis",".","This","latter","behavior","will","soon","be","deprecated",".","residual_connections",":","If","true",",","add","residual","connections","between","all","cells",".","This","requires","all","cells","to","have","the","same","output_size",".","Also",",","iff","the","input","size","is","not","equal","to","the","cell","output","size",",","a","linear","transform","is","added","before","the","first","layer",".","residual_combiner",":","One","of","``","add","''","or","``","concat","''",".","To","create","inputs","for","layer","t+1","either","``","add","''","the","inputs","from","the","prev","layer","or","concat","them",".","residual_dense",":","Densely","connect","each","layer","to","all","other","layers","Raises",":","ValueError",":","if","cells","is","empty","(","not","allowed",")",",","or","at","least","one","of","the","cells","returns","a","state","tuple","but","the","flag","`","state_is_tuple","`","is","`","False","`","."]
code: def __init__(
      self,
      cells,
      residual_connections=False,
      residual_combiner="add",
      residual_dense=False,
  ):
      """Create a RNN cell composed sequentially of a number of RNNCells.
  
      Args:
        cells: list of RNNCells that will be composed in this order.
        state_is_tuple: If True, accepted and returned states are n-tuples, where
          `n = len(cells)`.  If False, the states are all
          concatenated along the column axis.  This latter behavior will soon be
          deprecated.
        residual_connections: If true, add residual connections between all cells.
          This requires all cells to have the same output_size. Also, iff the
          input size is not equal to the cell output size, a linear transform
          is added before the first layer.
        residual_combiner: One of "add" or "concat". To create inputs for layer
          t+1 either "add" the inputs from the prev layer or concat them.
        residual_dense: Densely connect each layer to all other layers
  
      Raises:
        ValueError: if cells is empty (not allowed), or at least one of the cells
          returns a state tuple but the flag `state_is_tuple` is `False`.
      """
      super(ExtendedMultiRNNCell, self).__init__(
          cells, state_is_tuple=True
      )
      assert residual_combiner in ["add", "concat", "mean"]
  
      self._residual_connections = residual_connections
      self._residual_combiner = residual_combiner
      self._residual_dense = residual_dense
  
file_path: seq2seq/seq2seq/contrib/rnn_cell.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import sys
  import inspect
  import tensorflow
  from tensorflow.python.ops import array_ops
  from tensorflow.python.util import nest
  from tensorflow.contrib.rnn import MultiRNNCell
label_desc: Use image node_id 1 to create a new ExtendedMultiRNNCell object from inherited base classes: MultiRNNCell with example: obj = ExtendedMultiRNNCell(cells, residual_connections, residual_combiner, residual_dense)