KL-divergence between two multivariate gaussian

@Rojin
Actually, I have never used distribution class but based on docs, in this situation you just need to pass them directly to kl_div from distribution if the aforementioned distributions are obtained from Distribution subclasses or you have registered your own.

Please refer to this links for more information:

  1. https://pytorch.org/docs/stable/distributions.html#torch.distributions.kl.kl_divergence
  2. https://pytorch.org/docs/stable/distributions.html#torch.distributions.distribution.Distribution

well, you know, my name is Nik, somehow abbreviated of Nikan (a Persian name) :wink:

Bests

1 Like