Shortcuts

StudentTConvNd

class torch_uncertainty.layers.distributions.StudentTConvNd(base_layer, event_dim, min_scale=1e-06, min_df=2.0, fixed_df=None, **layer_args)[source]

Student’s T-Distribution Convolutional Density Layer.

Parameters:
  • base_layer (type[nn.Module]) – The base layer class.

  • event_dim (int) – The number of event dimensions.

  • min_scale (float) – The minimal value of the scale parameter.

  • min_df (float) – The minimal value of the degrees of freedom parameter.

  • fixed_df (float) – If not None, the degrees of freedom parameter is fixed to this value. Otherwise, it is learned.

  • **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 Student’s t-distribution of shape \((N, C_{out}, \ast)\) where \(C_{out} = \text{out_channels}\).

    • "scale": The standard deviation of the Student’s t-distribution of shape \((\ast, C_{out}, \ast)\).

    • "df": The degrees of freedom of the Student’s t distribution of shape \((\ast, C_{out}, \ast)\).