class_docstr: Categorical GRU Model.
  
  A model represented by a Categorical distribution
  which is parameterized by a Gated Recurrent Unit (GRU).
  
  Args:
      output_dim (int): Dimension of the network output.
      hidden_dim (int): Hidden dimension for GRU cell.
      name (str): Policy name, also the variable scope.
      hidden_nonlinearity (callable): Activation function for intermediate
          dense layer(s). It should return a tf.Tensor. Set it to
          None to maintain a linear activation.
      hidden_w_init (callable): Initializer function for the weight
          of intermediate dense layer(s). The function should return a
          tf.Tensor.
      hidden_b_init (callable): Initializer function for the bias
          of intermediate dense layer(s). The function should return a
          tf.Tensor.
      recurrent_nonlinearity (callable): Activation function for recurrent
          layers. It should return a tf.Tensor. Set it to None to
          maintain a linear activation.
      recurrent_w_init (callable): Initializer function for the weight
          of recurrent layer(s). The function should return a
          tf.Tensor.
      output_nonlinearity (callable): Activation function for output dense
          layer. It should return a tf.Tensor. Set it to None to
          maintain a linear activation.
      output_w_init (callable): Initializer function for the weight
          of output dense layer(s). The function should return a
          tf.Tensor.
      output_b_init (callable): Initializer function for the bias
          of output dense layer(s). The function should return a
          tf.Tensor.
      hidden_state_init (callable): Initializer function for the
          initial hidden state. The functino should return a tf.Tensor.
      hidden_state_init_trainable (bool): Bool for whether the initial
          hidden state is trainable.
      layer_normalization (bool): Bool for using layer normalization or not.
docstr: Build model.
  
  Args:
      state_input (tf.Tensor): Full observation input, with shape
          :math:`(N, T, S^*)`.
      step_input (tf.Tensor): Step observation input, with shape
          :math:`(N, S^*)`.
      step_hidden (tf.Tensor): Hidden state for step, with shape
          :math:`(N, S^*)`.
      name (str): Inner model name, also the variable scope of the
          inner model, if exist. One example is
          garage.tf.models.Sequential.
  
  Returns:
      tfp.distributions.OneHotCategorical: Policy distribution.
      tf.Tensor: Step output, with shape :math:`(N, S^*)`.
      tf.Tensor: Step hidden state, with shape :math:`(N, S^*)`.
      tf.Tensor: Initial hidden state , used to reset the hidden state
          when policy resets. Shape: :math:`(S^*)`.
code: def _build(self, state_input, step_input, step_hidden, name=None):
      """Build model.
  
      Args:
          state_input (tf.Tensor): Full observation input, with shape
              :math:`(N, T, S^*)`.
          step_input (tf.Tensor): Step observation input, with shape
              :math:`(N, S^*)`.
          step_hidden (tf.Tensor): Hidden state for step, with shape
              :math:`(N, S^*)`.
          name (str): Inner model name, also the variable scope of the
              inner model, if exist. One example is
              garage.tf.models.Sequential.
  
      Returns:
          tfp.distributions.OneHotCategorical: Policy distribution.
          tf.Tensor: Step output, with shape :math:`(N, S^*)`.
          tf.Tensor: Step hidden state, with shape :math:`(N, S^*)`.
          tf.Tensor: Initial hidden state , used to reset the hidden state
              when policy resets. Shape: :math:`(S^*)`.
  
      """
      outputs, step_output, step_hidden, init_hidden = super()._build(
          state_input, step_input, step_hidden, name=name
      )
      dist = tfp.distributions.OneHotCategorical(probs=outputs)
      return dist, step_output, step_hidden, init_hidden
  
file_path: garage/src/garage/tf/models/categorical_gru_model.py
imports: import tensorflow
  import tensorflow_probability
  from garage.experiment import deterministic
  from garage.tf.models.gru_model import GRUModel
label_desc: Use image node_id 3 for calling the CategoricalGRUModel obj's underlying member method code with example usage: obj._build(state_input, step_input, step_hidden, name) and returns: dist,  step_output,  step_hidden,  init_hidden