Shortcuts

StudentTLinear

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

Student’s T-Distribution Linear 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: \((\ast, H_{in})\) where \(\ast\) means any number of dimensions including none and \(H_{in} = \text{in_features}\).

  • Output: A dict with the following keys

    • "loc": The mean of the Student’s t-distribution of shape \((\ast, H_{out})\) where all but the last dimension are the same as the input and \(H_{out} = \text{out_features}\).

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

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