class_docstr: Recurrent neural network layer which is unrolled over a sequence input independently per
  timestep, and consequently does not maintain an internal state (specification key: `input_rnn`).
  
  Args:
      cell ('gru' | 'lstm'): The recurrent cell type
          (<span style="color:#C00000"><b>required</b></span>).
      size (int >= 0): Layer output size, 0 implies additionally removing the axis
          (<span style="color:#C00000"><b>required</b></span>).
      return_final_state (bool): Whether to return the final state instead of the per-step
          outputs (<span style="color:#00C000"><b>default</b></span>: true).
      bias (bool): Whether to add a trainable bias variable
          (<span style="color:#00C000"><b>default</b></span>: true).
      activation ('crelu' | 'elu' | 'leaky-relu' | 'none' | 'relu' | 'selu' | 'sigmoid' |
          'softmax' | 'softplus' | 'softsign' | 'swish' | 'tanh'): Activation nonlinearity
          (<span style="color:#00C000"><b>default</b></span>: tanh).
      dropout (parameter, 0.0 <= float < 1.0): Dropout rate
          (<span style="color:#00C000"><b>default</b></span>: 0.0).
      vars_trainable (bool): Whether layer variables are trainable
          (<span style="color:#00C000"><b>default</b></span>: true).
      l2_regularization (float >= 0.0): Scalar controlling L2 regularization
          (<span style="color:#00C000"><b>default</b></span>: inherit value of parent module).
      name (string): Layer name
          (<span style="color:#00C000"><b>default</b></span>: internally chosen).
      input_spec (specification): <span style="color:#00C000"><b>internal use</b></span>.
      kwargs: Additional arguments for Keras RNN layer, see
          `TensorFlow docs <https://www.tensorflow.org/api_docs/python/tf/keras/layers>`__.
class_docstr_tok: ["Recurrent","neural","network","layer","which","is","unrolled","over","a","sequence","input","independently","per","timestep",",","and","consequently","does","not","maintain","an","internal","state","(","specification","key",":","`","input_rnn","`",")",".","Args",":","cell","(","'gru","'","|","'lstm","'",")",":","The","recurrent","cell","type","(","<","span","style=","''","color",":","#","C00000","''",">","<","b",">","required","<","\/b",">","<","\/span",">",")",".","size","(","int",">","=","0",")",":","Layer","output","size",",","0","implies","additionally","removing","the","axis","(","<","span","style=","''","color",":","#","C00000","''",">","<","b",">","required","<","\/b",">","<","\/span",">",")",".","return_final_state","(","bool",")",":","Whether","to","return","the","final","state","instead","of","the","per-step","outputs","(","<","span","style=","''","color",":","#","00C000","''",">","<","b",">","default","<","\/b",">","<","\/span",">",":","true",")",".","bias","(","bool",")",":","Whether","to","add","a","trainable","bias","variable","(","<","span","style=","''","color",":","#","00C000","''",">","<","b",">","default","<","\/b",">","<","\/span",">",":","true",")",".","activation","(","'crelu","'","|","'elu","'","|","'leaky-relu","'","|","'none","'","|","'relu","'","|","'selu","'","|","'sigmoid","'","|","'softmax","'","|","'softplus","'","|","'softsign","'","|","'swish","'","|","'tanh","'",")",":","Activation","nonlinearity","(","<","span","style=","''","color",":","#","00C000","''",">","<","b",">","default","<","\/b",">","<","\/span",">",":","tanh",")",".","dropout","(","parameter",",","0.0","<","=","float","<","1.0",")",":","Dropout","rate","(","<","span","style=","''","color",":","#","00C000","''",">","<","b",">","default","<","\/b",">","<","\/span",">",":","0.0",")",".","vars_trainable","(","bool",")",":","Whether","layer","variables","are","trainable","(","<","span","style=","''","color",":","#","00C000","''",">","<","b",">","default","<","\/b",">","<","\/span",">",":","true",")",".","l2_regularization","(","float",">","=","0.0",")",":","Scalar","controlling","L2","regularization","(","<","span","style=","''","color",":","#","00C000","''",">","<","b",">","default","<","\/b",">","<","\/span",">",":","inherit","value","of","parent","module",")",".","name","(","string",")",":","Layer","name","(","<","span","style=","''","color",":","#","00C000","''",">","<","b",">","default","<","\/b",">","<","\/span",">",":","internally","chosen",")",".","input_spec","(","specification",")",":","<","span","style=","''","color",":","#","00C000","''",">","<","b",">","internal","use","<","\/b",">","<","\/span",">",".","kwargs",":","Additional","arguments","for","Keras","RNN","layer",",","see","`","TensorFlow","docs","<","https",":","\/\/www.tensorflow.org\/api_docs\/python\/tf\/keras\/layers",">","`","__","."]
code: def apply(self, *, x):
      x = tf_util.float32(x=x)
      x = self.rnn(inputs=x, initial_state=None)
  
      if not self.return_final_state:
          x = tf_util.cast(x=x[0], dtype="float")
      elif self.cell_type == "gru":
          x = tf_util.cast(x=x[1], dtype="float")
      elif self.cell_type == "lstm":
          x = tf_util.cast(
              x=tf.concat(values=(x[1], x[2]), axis=1), dtype="float"
          )
  
      return super().apply(x=x)
  
file_path: tensorforce/tensorforce/core/layers/input_rnn.py
imports: import tensorflow
  from tensorforce import TensorforceError
  from tensorforce.core import TensorSpec, tf_function, tf_util
  from tensorforce.core.layers import TransformationBase
label_desc: Use image node_id 6 for calling the InputRnn obj's underlying member method code with example usage: obj.apply() and returns: super