class_docstr: Neural Architecture Search (NAS) recurrent network cell.
  
  This implements the recurrent cell from the paper:
  
    https://arxiv.org/abs/1611.01578
  
  Barret Zoph and Quoc V. Le.
  "Neural Architecture Search with Reinforcement Learning" Proc. ICLR 2017.
  
  The class uses an optional projection layer.
  
  Example:
  
  >>> inputs = np.random.random([30,23,9]).astype(np.float32)
  >>> NASCell = tfa.rnn.NASCell(4)
  >>> rnn = tf.keras.layers.RNN(NASCell, return_sequences=True, return_state=True)
  >>> outputs, memory_state, carry_state = rnn(inputs)
  >>> outputs.shape
  TensorShape([30, 23, 4])
  >>> memory_state.shape
  TensorShape([30, 4])
  >>> carry_state.shape
  TensorShape([30, 4])
class_docstr_tok: ["Neural","Architecture","Search","(","NAS",")","recurrent","network","cell",".","This","implements","the","recurrent","cell","from","the","paper",":","https",":","\/\/arxiv.org\/abs\/1611.01578","Barret","Zoph","and","Quoc","V.","Le",".","``","Neural","Architecture","Search","with","Reinforcement","Learning","''","Proc",".","ICLR","2017",".","The","class","uses","an","optional","projection","layer",".","Example",":",">",">",">","inputs","=","np.random.random","(","[","30,23,9","]",")",".astype","(","np.float32",")",">",">",">","NASCell","=","tfa.rnn.NASCell","(","4",")",">",">",">","rnn","=","tf.keras.layers.RNN","(","NASCell",",","return_sequences=True",",","return_state=True",")",">",">",">","outputs",",","memory_state",",","carry_state","=","rnn","(","inputs",")",">",">",">","outputs.shape","TensorShape","(","[","30",",","23",",","4","]",")",">",">",">","memory_state.shape","TensorShape","(","[","30",",","4","]",")",">",">",">","carry_state.shape","TensorShape","(","[","30",",","4","]",")"]
docstr: Initialize the parameters for a NAS cell.
  
  Args:
    units: int, The number of units in the NAS cell.
    projection: (optional) int, The output dimensionality for the
      projection matrices.  If None, no projection is performed.
    use_bias: (optional) bool, If True then use biases within the cell.
      This is False by default.
    kernel_initializer: Initializer for kernel weight.
    recurrent_initializer: Initializer for recurrent kernel weight.
    projection_initializer: Initializer for projection weight, used when
      projection is not None.
    bias_initializer: Initializer for bias, used when use_bias is True.
    **kwargs: Additional keyword arguments.
docstr_tok: ["Initialize","the","parameters","for","a","NAS","cell",".","Args",":","units",":","int",",","The","number","of","units","in","the","NAS","cell",".","projection",":","(","optional",")","int",",","The","output","dimensionality","for","the","projection","matrices",".","If","None",",","no","projection","is","performed",".","use_bias",":","(","optional",")","bool",",","If","True","then","use","biases","within","the","cell",".","This","is","False","by","default",".","kernel_initializer",":","Initializer","for","kernel","weight",".","recurrent_initializer",":","Initializer","for","recurrent","kernel","weight",".","projection_initializer",":","Initializer","for","projection","weight",",","used","when","projection","is","not","None",".","bias_initializer",":","Initializer","for","bias",",","used","when","use_bias","is","True",".","*","*","kwargs",":","Additional","keyword","arguments","."]
code: def __init__(
      self,
      units: TensorLike,
      projection: Optional[FloatTensorLike] = None,
      use_bias: bool = False,
      kernel_initializer: Initializer = "glorot_uniform",
      recurrent_initializer: Initializer = "glorot_uniform",
      projection_initializer: Initializer = "glorot_uniform",
      bias_initializer: Initializer = "zeros",
      **kwargs,
  ):
      """Initialize the parameters for a NAS cell.
  
      Args:
        units: int, The number of units in the NAS cell.
        projection: (optional) int, The output dimensionality for the
          projection matrices.  If None, no projection is performed.
        use_bias: (optional) bool, If True then use biases within the cell.
          This is False by default.
        kernel_initializer: Initializer for kernel weight.
        recurrent_initializer: Initializer for recurrent kernel weight.
        projection_initializer: Initializer for projection weight, used when
          projection is not None.
        bias_initializer: Initializer for bias, used when use_bias is True.
        **kwargs: Additional keyword arguments.
      """
      super().__init__(**kwargs)
      self.units = units
      self.projection = projection
      self.use_bias = use_bias
      self.kernel_initializer = kernel_initializer
      self.recurrent_initializer = recurrent_initializer
      self.projection_initializer = projection_initializer
      self.bias_initializer = bias_initializer
  
      if projection is not None:
          self._state_size = [units, projection]
          self._output_size = projection
      else:
          self._state_size = [units, units]
          self._output_size = units
  
file_path: addons/tensorflow_addons/rnn/nas_cell.py
imports: import tensorflow
  from typeguard import typechecked
  from tensorflow_addons.rnn.abstract_rnn_cell import AbstractRNNCell
  from tensorflow_addons.utils.types import FloatTensorLike, TensorLike, Initializer
  from typing import Optional
label_desc: Use image node_id 1 to create a new NASCell object from inherited base classes: AbstractRNNCell with example: obj = NASCell(units, projection, use_bias, kernel_initializer, recurrent_initializer, projection_initializer, bias_initializer)