samim:

 kl_divergence


How did you derive this? and why did you not use the provided functional form of KL divergence? This is out of curiosity because I am looking to implement the VAE using torch.nn.functional.kl_div.