Module laplace.laplace
Functions
def Laplace(model, likelihood, subset_of_weights='last_layer', hessian_structure='kron', *args, **kwargs)
-
Simplified Laplace access using strings instead of different classes.
Parameters
model
:torch.nn.Module
likelihood
:{'classification', 'regression'}
subset_of_weights
:{'last_layer', 'subnetwork', 'all'}
, default='last_layer'
- subset of weights to consider for inference
hessian_structure
:{'diag', 'kron', 'full', 'lowrank'}
, default='kron'
- structure of the Hessian approximation
Returns
laplace
:ParametricLaplace
- chosen subclass of ParametricLaplace instantiated with additional arguments