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', 'all'}, default='last_layer'
subset of weights to consider for inference
hessian_structure : {'diag', 'kron', 'full'}, default='kron'
structure of the Hessian approximation

Returns

laplace : BaseLaplace
chosen subclass of BaseLaplace instantiated with additional arguments