docstr: Calculated KL-Divergence with another MultivariateNormalDist distribution
  See https://en.wikipedia.org/wiki/Kullback%E2%80%93Leibler_divergence
  Specifically https://wikimedia.org/api/rest_v1/media/math/render/svg/a3bf3b4917bd1fcb8be48d6d6139e2e387bdc7d3
  
  :param alt_dist: alternative distribution used for kl divergence calculation
  :type alt_dist: MultivariateNormalDist
  :return: KL-Divergence, of shape (1,)
docstr_tok: ["Calculated","KL-Divergence","with","another","MultivariateNormalDist","distribution","See","https",":","\/\/en.wikipedia.org\/wiki\/Kullback","%","E2","%","80","%","93Leibler_divergence","Specifically","https",":","\/\/wikimedia.org\/api\/rest_v1\/media\/math\/render\/svg\/a3bf3b4917bd1fcb8be48d6d6139e2e387bdc7d3",":","param","alt_dist",":","alternative","distribution","used","for","kl","divergence","calculation",":","type","alt_dist",":","MultivariateNormalDist",":","return",":","KL-Divergence",",","of","shape","(","1",",",")"]
code: def kl_div(self, alt_dist) -> nd_sym_type:
      """
      Calculated KL-Divergence with another MultivariateNormalDist distribution
      See https://en.wikipedia.org/wiki/Kullback%E2%80%93Leibler_divergence
      Specifically https://wikimedia.org/api/rest_v1/media/math/render/svg/a3bf3b4917bd1fcb8be48d6d6139e2e387bdc7d3
  
      :param alt_dist: alternative distribution used for kl divergence calculation
      :type alt_dist: MultivariateNormalDist
      :return: KL-Divergence, of shape (1,)
      """
      sigma_a_inv = self.F.linalg.potri(self.F.linalg.potrf(self.sigma))
      sigma_b_inv = self.F.linalg.potri(
          self.F.linalg.potrf(alt_dist.sigma)
      )
      term1a = mx.nd.batch_dot(sigma_b_inv, self.sigma)
      # sum of diagonal for batch of matrices
      term1 = (
          (
              broadcast_like(self.F, self.F.eye(self.num_var), term1a)
              * term1a
          )
          .sum(axis=-1)
          .sum(axis=-1)
      )
      mean_diff = (alt_dist.mean - self.mean).expand_dims(-1)
      mean_diff_t = (alt_dist.mean - self.mean).expand_dims(-2)
      term2 = self.F.batch_dot(
          self.F.batch_dot(mean_diff_t, sigma_b_inv), mean_diff
      ).reshape_like(term1)
      term3 = (
          2
          * self.F.linalg.sumlogdiag(
              self.F.linalg.potrf(alt_dist.sigma)
          )
      ) - (
          2 * self.F.linalg.sumlogdiag(self.F.linalg.potrf(self.sigma))
      )
      return 0.5 * (term1 + term2 - self.num_var + term3)
  
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 6 for calling the MultivariateNormalDist obj's underlying member method code with example usage: obj.kl_div(alt_dist) and returns: unknown