torchbayesian.bnn.utils#

Short description.

Functionals#

Description.

enable_mc_dropout

Enables only the dropout layers of a module, even in eval mode.

Bayesian Conversion Backend#

Short description.

register_reparametrization

Replaces a tensor (parameter or buffer) in a module by registering a stochastic reparametrization module in its place.

Reparametrization

This class wraps the variational posterior module and handles safety checks for the replacement of the parameter or buffer by the variational posterior and its forward call.

Short description.

get_posterior

Creates an instance of a 'VariationalPosterior' subclass to replace a given tensor.

get_prior

Creates an instance of a 'Prior' subclass.

Posterior and Prior Customization#

Description.

PosteriorFactory

This class is a base class for object factories.

PriorFactory

This class is a base class for object factories.