KL-divergence between two multivariate gaussian

Check this thread.
torch.diag_embed() should do the trick.

2 Likes