class_docstr: Module that produces a categorical distribution with the given number of values.
class_docstr_tok: ["Module","that","produces","a","categorical","distribution","with","the","given","number","of","values","."]
code: def __call__(self, inputs: jnp.ndarray) -> tfd.Distribution:
      logits = self._linear(inputs)
      if not isinstance(self._logit_shape, int):
          logits = hk.Reshape(self._logit_shape)(logits)
      return tfd.Categorical(logits=logits, dtype=self._dtype)
  
imports: from typing import Any, List, Optional, Sequence, Union, Callable
  import chex
  import haiku
  import jax
  import jax.numpy
  import numpy
  import tensorflow_probability
  import tensorflow_probability.substrates.jax
label_desc: Use image node_id 2 for calling the CategoricalHead obj's underlying member method code with example usage: obj.__call__(inputs) and returns: tfd