class_docstr: Categorical distribution parametrized by logits.
docstr: Initializes Categorical distribution.
  
  Args:
    n_categories (int): Number of categories.
    shape (tuple): Shape of the sample.
docstr_tok: ["Initializes","Categorical","distribution",".","Args",":","n_categories","(","int",")",":","Number","of","categories",".","shape","(","tuple",")",":","Shape","of","the","sample","."]
code: def __init__(self, n_categories, shape=()):
      """Initializes Categorical distribution.
  
      Args:
        n_categories (int): Number of categories.
        shape (tuple): Shape of the sample.
      """
      self._n_categories = n_categories
      self._shape = shape
  
imports: import gin
  import gym
  import numpy
  from trax import layers
  from trax.fastmath import numpy
label_desc: Use image node_id 1 to create a new Categorical object from inherited base classes: Distribution with example: obj = Categorical(n_categories, shape)