class_docstr: Categorical GRU Policy.
  
  A policy represented by a Categorical distribution
  which is parameterized by a Gated Recurrent Unit (GRU).
  
  It only works with akro.Discrete action space.
  
  Args:
      env_spec (garage.envs.env_spec.EnvSpec): Environment specification.
      name (str): Policy name, also the variable scope.
      hidden_dim (int): Hidden dimension for LSTM cell.
      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.
      state_include_action (bool): Whether the state includes action.
          If True, input dimension will be
          (observation dimension + action dimension).
      layer_normalization (bool): Bool for using layer normalization or not.
class_docstr_tok: ["Categorical","GRU","Policy",".","A","policy","represented","by","a","Categorical","distribution","which","is","parameterized","by","a","Gated","Recurrent","Unit","(","GRU",")",".","It","only","works","with","akro.Discrete","action","space",".","Args",":","env_spec","(","garage.envs.env_spec.EnvSpec",")",":","Environment","specification",".","name","(","str",")",":","Policy","name",",","also","the","variable","scope",".","hidden_dim","(","int",")",":","Hidden","dimension","for","LSTM","cell",".","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",".","state_include_action","(","bool",")",":","Whether","the","state","includes","action",".","If","True",",","input","dimension","will","be","(","observation","dimension","+","action","dimension",")",".","layer_normalization","(","bool",")",":","Bool","for","using","layer","normalization","or","not","."]
docstr: Build policy.
  
  Args:
      state_input (tf.Tensor) : State input.
      name (str): Name of the policy, which is also the name scope.
  
  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^*)`.
docstr_tok: ["Build","policy",".","Args",":","state_input","(","tf.Tensor",")",":","State","input",".","name","(","str",")",":","Name","of","the","policy",",","which","is","also","the","name","scope",".","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, name=None):
      """Build policy.
  
      Args:
          state_input (tf.Tensor) : State input.
          name (str): Name of the policy, which is also the name scope.
  
      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^*)`.
  
      """
      _, step_input_var, step_hidden_var = self.inputs
      return super().build(
          state_input, step_input_var, step_hidden_var, name=name
      )
  
imports: import akro
  import numpy
  import tensorflow
  from garage.experiment import deterministic
  from garage.tf.models import CategoricalGRUModel
  from garage.tf.policies.policy import Policy
label_desc: Use image node_id 3 for calling the CategoricalGRUPolicy obj's underlying member method code with example usage: obj.build(state_input, name) and returns: super