class_docstr: Policy that chooses an action based on a categorical distribution.
  
  The distribution is specified by a set of weights for each action and an
  inverse temperature. The unnormalized probability distribution is given by
  `exp(weight * inv_temp)`. Weights and inverse temperature are typically
  maintained as `Variable`s, and are updated by an `Agent`.
  
  Note that this policy does not make use of `time_step.observation` at all.
  That is, it is a non-contextual bandit policy.
class_docstr_tok: ["Policy","that","chooses","an","action","based","on","a","categorical","distribution",".","The","distribution","is","specified","by","a","set","of","weights","for","each","action","and","an","inverse","temperature",".","The","unnormalized","probability","distribution","is","given","by","`","exp","(","weight","*","inv_temp",")","`",".","Weights","and","inverse","temperature","are","typically","maintained","as","`","Variable","`","s",",","and","are","updated","by","an","`","Agent","`",".","Note","that","this","policy","does","not","make","use","of","`","time_step.observation","`","at","all",".","That","is",",","it","is","a","non-contextual","bandit","policy","."]
code: def _variables(self):
      return [
          v
          for v in [self._weights, self._inverse_temperature]
          if isinstance(v, tf.Variable)
      ]
  
file_path: agents/tf_agents/bandits/policies/categorical_policy.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Optional, Text
  import tensorflow
  import tensorflow_probability
  from tf_agents.policies import tf_policy
  from tf_agents.trajectories import policy_step
  from tf_agents.typing import types
  from tf_agents.utils import common
  from tf_agents.utils import nest_utils
label_desc: Use image node_id 2 for calling the CategoricalPolicy obj's underlying member method code with example usage: obj._variables() and returns: unknown