piEsposito / blitz-bayesian-deep-learning

A simple and extensible library to create Bayesian Neural Network layers on PyTorch.
GNU General Public License v3.0
918 stars 107 forks source link

weights std in BayesianLinear #72

Closed unnir closed 3 years ago

unnir commented 3 years ago

Hey,

sorry, I could not find the answer.

How can I get the uncertainty estimate for each weight in the BayesianLinear layer? I mean the std for each weighty.

Thanks

piEsposito commented 3 years ago

Hello @unnir and thank you so much for using BLiTZ.

For each layer, you can get the rho for weight and bias attributes and follow the equataion from the paper:

log (1 + exp(rho))

The resulting matrix will correpspond to the std you are looking for

Best regards, -Pi

piEsposito commented 3 years ago

Closing due to staleness.