NormalInverseGammaConvNd¶
- class torch_uncertainty.layers.distributions.NormalInverseGammaConvNd(base_layer, event_dim, min_lmbda=1e-06, min_alpha=1e-06, min_beta=1e-06, **layer_args)[source]¶
Normal-Inverse-Gamma Distribution Convolutional 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 \(\lambda\) parameter.
min_alpha (float) – The minimal value of the \(\alpha\) parameter.
min_beta (float) – The minimal value of the \(\beta\) parameter.
**layer_args – Additional arguments for the base layer.
- Shape:
Input: \((N, C_{in}, \ast)\) where \(\ast\) means any number of dimensions and \(C_{in} = \text{in_channels}\) and \(N\) is the batch size.
Output: A dict with the following keys
"loc"
: The mean of the Normal-Inverse-Gamma distribution of shape \((N, C_{out}, \ast)\) where \(C_{out} = \text{out_channels}\)."lmbda"
: The lambda parameter of the Normal-Inverse-Gamma distribution of shape \((N, C_{out}, \ast)\)."alpha"
: The alpha parameter of the Normal-Inverse-Gamma distribution of shape \((N, C_{out}, \ast)\)."beta"
: The beta parameter of the Normal-Inverse-Gamma distribution of shape \((N, C_{out}, \ast)\).
- Source: