class_docstr: Still under development.
class_docstr_tok: ["Still","under","development","."]
code: def _initialize(self, d, n_categories):
      self.n_categories = []
      for n_cat in n_categories:
          if isinstance(n_cat, (list, tuple)):
              self.n_categories.append(tuple(n_cat))
          elif isinstance(n_cat, (numpy.ndarray, torch.Tensor)):
              self.n_categories.append(tuple(n_cat.tolist()))
  
      self.n_parents = len(self.n_categories[0])
      self.probs = torch.nn.ParameterList(
          [
              _cast_as_parameter(
                  torch.zeros(
                      *cats,
                      dtype=self.dtype,
                      device=self.device,
                      requires_grad=False,
                  )
              )
              for cats in self.n_categories
          ]
      )
  
      self._initialized = True
      super()._initialize(d)
  
file_path: pomegranate/pomegranate/distributions/conditional_categorical.py
imports: import numpy
  import torch
  import itertools
  from .._utils import _cast_as_tensor
  from .._utils import _cast_as_parameter
  from .._utils import _update_parameter
  from .._utils import _check_parameter
  from .._utils import _reshape_weights
  from .._utils import BufferList
  from ._distribution import ConditionalDistribution
  from .categorical import Categorical
label_desc: Use image node_id 2 for calling the ConditionalCategorical obj's underlying member method code with example usage: obj._initialize(d, n_categories) without return types