vbll_loss¶
- probly.losses.vbll_loss = <flextype.singledispatch.Flexdispatch object>¶
Compute the negative VBLL ELBO from [HWS24].
Routes to the variant-specific training objective based on the type of
layer(e.g. the double-Jensen bound for aVBLLLayeror the generative Jensen bound for aGVBLLLayer). Useprobly.method.vbll.find_vbll_layer()to retrieve the layer from a transformed predictor.- Parameters:
layer – The variational Bayesian last layer to fit.
features – Backbone features feeding the layer, shape
(batch, in_features).targets – Integer class labels, shape
(batch,).regularization_weight – Weight on the KL/regularization terms (typically
1 / dataset_size).
- Returns:
A scalar tensor with the negative ELBO to minimize.
Examples using probly.losses.vbll_loss¶
Generative Variational Bayesian Last Layers on Two Moons
Heteroscedastic Variational Bayesian Last Layers on Two Moons
Student-t Variational Bayesian Last Layers on Two Moons