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

about local reparameterization trick #37

Closed ShellingFord221 closed 4 years ago

ShellingFord221 commented 4 years ago

Hi, in your new code, there is no implementation about the local reparameterization trick. If I want to use it to compute the output of the convolution layer, I should replace sigma^2 with alpha mu^2 (just like the implementation in your old code). But should I also replace sigma^2 with alpha mu^2 when computing the KL divergence? i.e. should KL also be affected by the parameter alpha? Why or why not? Thanks!

fettay commented 4 years ago

Up

kumar-shridhar commented 4 years ago

It should. Please check it out now.