LaplaceLinear¶
- class torch_uncertainty.layers.distributions.LaplaceLinear(base_layer, event_dim, min_scale=1e-06, **layer_args)[source]¶
Laplace 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.
**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 Laplace 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 Laplace distribution of shape \((\ast, H_{out})\).