Solved by Nikronic in post #3 
              
              
                Hi, 
You are right. When you are using distributions from torch.distribution package, you are doing fine by using torch.distribution.kl_divergence. But if you want to get kl by passing two tensors obtain elsewhere, you can do following approach: 


@Rojin I have posted this on your thread actually. 
…