kumar-shridhar / PyTorch-BayesianCNN

Bayesian Convolutional Neural Network with Variational Inference based on Bayes by Backprop in PyTorch.
MIT License
1.42k stars 323 forks source link

Question about calculate_kl #73

Open longcwang3 opened 1 year ago

longcwang3 commented 1 year ago

For calculate_kl, I am assuming mu_q refers to the variational posterior and mu_p refers to the prior. https://github.com/kumar-shridhar/PyTorch-BayesianCNN/blob/d93bad543c3226cd0fe05c0cb0ba033c41b3caa6/metrics.py#L27-L29

While in the following codes, prior_mu is input as mu_q. https://github.com/kumar-shridhar/PyTorch-BayesianCNN/blob/d93bad543c3226cd0fe05c0cb0ba033c41b3caa6/layers/BBB_LRT/BBBLinear.py#L75-L79

Could you check this?