NormalInverseGammaLinear¶
- class torch_uncertainty.layers.distributions.NormalInverseGammaLinear(base_layer, event_dim, min_lmbda=1e-06, min_alpha=1e-06, min_beta=1e-06, **layer_args)[source]¶
Normal-Inverse-Gamma Distribution Linear Density Layer.
- Parameters:
base_layer (type[nn.Module]) – The base layer class.
event_dim (int) – The number of event dimensions.
min_lmbda (float) – The minimal value of the
parameter.min_alpha (float) – The minimal value of the
parameter.min_beta (float) – The minimal value of the
parameter.**layer_args – Additional arguments for the base layer.
- Shape:
Input:
where means any number of dimensions including none and .Output: A dict with the following keys
"loc"
: The mean of the Normal-Inverse-Gamma distribution of shape where all but the last dimension are the same as the input and ."lmbda"
: The lambda parameter of the Normal-Inverse-Gamma distribution of shape ."alpha"
: The alpha parameter of the Normal-Inverse-Gamma distribution of shape ."beta"
: The beta parameter of the Normal-Inverse-Gamma distribution of shape .
- Source: