class_docstr: Subclass of RNNCells that act like proper `tf.Layer` objects.
  
  For backwards compatibility purposes, most `RNNCell` instances allow their
  `call` methods to instantiate variables via `tf.compat.v1.get_variable`.  The
  underlying
  variable scope thus keeps track of any variables, and returning cached
  versions.  This is atypical of `tf.layer` objects, which separate this
  part of layer building into a `build` method that is only called once.
  
  Here we provide a subclass for `RNNCell` objects that act exactly as
  `Layer` objects do.  They must provide a `build` method and their
  `call` methods do not access Variables `tf.compat.v1.get_variable`.
class_docstr_tok: ["Subclass","of","RNNCells","that","act","like","proper","`","tf.Layer","`","objects",".","For","backwards","compatibility","purposes",",","most","`","RNNCell","`","instances","allow","their","`","call","`","methods","to","instantiate","variables","via","`","tf.compat.v1.get_variable","`",".","The","underlying","variable","scope","thus","keeps","track","of","any","variables",",","and","returning","cached","versions",".","This","is","atypical","of","`","tf.layer","`","objects",",","which","separate","this","part","of","layer","building","into","a","`","build","`","method","that","is","only","called","once",".","Here","we","provide","a","subclass","for","`","RNNCell","`","objects","that","act","exactly","as","`","Layer","`","objects","do",".","They","must","provide","a","`","build","`","method","and","their","`","call","`","methods","do","not","access","Variables","`","tf.compat.v1.get_variable","`","."]
docstr: Run this RNN cell on inputs, starting from the given state.
  
  Args:
    inputs: `2-D` tensor with shape `[batch_size, input_size]`.
    state: if `self.state_size` is an integer, this should be a `2-D Tensor`
      with shape `[batch_size, self.state_size]`.  Otherwise, if
      `self.state_size` is a tuple of integers, this should be a tuple with
      shapes `[batch_size, s] for s in self.state_size`.
    *args: Additional positional arguments.
    scope: optional cell scope.
    **kwargs: Additional keyword arguments.
  
  Returns:
    A pair containing:
  
    - Output: A `2-D` tensor with shape `[batch_size, self.output_size]`.
    - New state: Either a single `2-D` tensor, or a tuple of tensors matching
      the arity and shapes of `state`.
docstr_tok: ["Run","this","RNN","cell","on","inputs",",","starting","from","the","given","state",".","Args",":","inputs",":","`","2-D","`","tensor","with","shape","`","[","batch_size",",","input_size","]","`",".","state",":","if","`","self.state_size","`","is","an","integer",",","this","should","be","a","`","2-D","Tensor","`","with","shape","`","[","batch_size",",","self.state_size","]","`",".","Otherwise",",","if","`","self.state_size","`","is","a","tuple","of","integers",",","this","should","be","a","tuple","with","shapes","`","[","batch_size",",","s","]","for","s","in","self.state_size","`",".","*","args",":","Additional","positional","arguments",".","scope",":","optional","cell","scope",".","*","*","kwargs",":","Additional","keyword","arguments",".","Returns",":","A","pair","containing",":","-","Output",":","A","`","2-D","`","tensor","with","shape","`","[","batch_size",",","self.output_size","]","`",".","-","New","state",":","Either","a","single","`","2-D","`","tensor",",","or","a","tuple","of","tensors","matching","the","arity","and","shapes","of","`","state","`","."]
code: def __call__(self, inputs, state, *args, scope=None, **kwargs):
      """Run this RNN cell on inputs, starting from the given state.
  
      Args:
        inputs: `2-D` tensor with shape `[batch_size, input_size]`.
        state: if `self.state_size` is an integer, this should be a `2-D Tensor`
          with shape `[batch_size, self.state_size]`.  Otherwise, if
          `self.state_size` is a tuple of integers, this should be a tuple with
          shapes `[batch_size, s] for s in self.state_size`.
        *args: Additional positional arguments.
        scope: optional cell scope.
        **kwargs: Additional keyword arguments.
  
      Returns:
        A pair containing:
  
        - Output: A `2-D` tensor with shape `[batch_size, self.output_size]`.
        - New state: Either a single `2-D` tensor, or a tuple of tensors matching
          the arity and shapes of `state`.
      """
      # Bypass RNNCell's variable capturing semantics for LayerRNNCell.
      # Instead, it is up to subclasses to provide a proper build
      # method.  See the class docstring for more details.
      return tf.layers.Layer.__call__(
          self, inputs, state, scope=scope, *args, **kwargs
      )
  
imports: import tensorflow.compat.v1
  import tf_slim
  from tensorflow.python.ops import gen_nn_ops
label_desc: Use image node_id 1 for calling the LayerRNNCell obj's underlying member method code with example usage: obj.__call__(inputs, state) and returns: tf