docstr: Calculated KL-Divergence with another Categorical distribution
  
  :param alt_dist: alternative distribution used for kl divergence calculation
  :type alt_dist: CategoricalDist
  :return: KL-Divergence
docstr_tok: ["Calculated","KL-Divergence","with","another","Categorical","distribution",":","param","alt_dist",":","alternative","distribution","used","for","kl","divergence","calculation",":","type","alt_dist",":","CategoricalDist",":","return",":","KL-Divergence"]
code: def kl_div(self, alt_dist) -> nd_sym_type:
      """
      Calculated KL-Divergence with another Categorical distribution
  
      :param alt_dist: alternative distribution used for kl divergence calculation
      :type alt_dist: CategoricalDist
      :return: KL-Divergence
      """
      logits_a = self.probs.clip(a_min=eps, a_max=1 - eps).log()
      logits_b = alt_dist.probs.clip(a_min=eps, a_max=1 - eps).log()
      t = self.probs * (logits_a - logits_b)
      t = self.F.where(
          condition=(alt_dist.probs == 0),
          x=self.F.ones_like(alt_dist.probs) * math.inf,
          y=t,
      )
      t = self.F.where(
          condition=(self.probs == 0),
          x=self.F.zeros_like(self.probs),
          y=t,
      )
      return t.sum(axis=-1)
  
imports: from typing import List, Tuple, Union
  from types import ModuleType
  import math
  import mxnet
  from mxnet.gluon import nn
  from rl_coach.base_parameters import AgentParameters
  from rl_coach.core_types import ActionProbabilities
  from rl_coach.spaces import SpacesDefinition, BoxActionSpace, DiscreteActionSpace
  from rl_coach.utils import eps
  from rl_coach.architectures.mxnet_components.heads.head import Head, HeadLoss, LossInputSchema, NormalizedRSSInitializer
  from rl_coach.architectures.mxnet_components.heads.head import LOSS_OUT_TYPE_LOSS, LOSS_OUT_TYPE_REGULARIZATION
  from rl_coach.architectures.mxnet_components.utils import hybrid_clip, broadcast_like
label_desc: Use image node_id 4 for calling the CategoricalDist obj's underlying member method code with example usage: obj.kl_div(alt_dist) and returns: t