class_docstr: Categorical MLP Policy.
  
  A policy represented by a Categorical distribution
  which is parameterized by a multilayer perceptron (MLP).
  
  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_sizes (list[int]): Output dimension of dense layer(s).
          For example, (32, 32) means the MLP of this policy consists of two
          hidden layers, each with 32 hidden units.
      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.
      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.
      layer_normalization (bool): Bool for using layer normalization or not.
class_docstr_tok: ["Categorical","MLP","Policy",".","A","policy","represented","by","a","Categorical","distribution","which","is","parameterized","by","a","multilayer","perceptron","(","MLP",")",".","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_sizes","(","list","[","int","]",")",":","Output","dimension","of","dense","layer","(","s",")",".","For","example",",","(","32",",","32",")","means","the","MLP","of","this","policy","consists","of","two","hidden","layers",",","each","with","32","hidden","units",".","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",".","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",".","layer_normalization","(","bool",")",":","Bool","for","using","layer","normalization","or","not","."]
docstr: Return a single action.
  
  Args:
      observation (numpy.ndarray): Observations.
  
  Returns:
      int: Action given input observation.
      dict(numpy.ndarray): Distribution parameters.
docstr_tok: ["Return","a","single","action",".","Args",":","observation","(","numpy.ndarray",")",":","Observations",".","Returns",":","int",":","Action","given","input","observation",".","dict","(","numpy.ndarray",")",":","Distribution","parameters","."]
code: def get_action(self, observation):
      """Return a single action.
  
      Args:
          observation (numpy.ndarray): Observations.
  
      Returns:
          int: Action given input observation.
          dict(numpy.ndarray): Distribution parameters.
  
      """
      actions, agent_infos = self.get_actions([observation])
      return actions, {k: v[0] for k, v in agent_infos.items()}
  
file_path: garage/src/garage/tf/policies/categorical_mlp_policy.py
imports: import akro
  import numpy
  import tensorflow
  from garage.experiment import deterministic
  from garage.tf.models import CategoricalMLPModel
  from garage.tf.policies.policy import Policy
label_desc: Use image node_id 4 for calling the CategoricalMLPPolicy obj's underlying member method code with example usage: obj.get_action(observation) and returns: actions,  unknown