t_vbll_loss¶
- probly.train.vbll.torch.t_vbll_loss(layer: TVBLLLayer, features: Tensor, targets: Tensor, regularization_weight: float) Tensor[source]¶
Negative ELBO of a
TVBLLLayerusing the reduced Knowles-Minka bound.Implements the Student-t discriminative objective of [HWS24], combining the reduced Knowles-Minka softmax bound with the Gamma noise-precision KL and the weight-posterior KL.
- Parameters:
layer – The Student-t 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 regularization terms (typically
1 / dataset_size).
- Returns:
A scalar tensor with the negative ELBO to minimize.