probly.layers.torch

torch layer implementations.

Classes

BatchEnsembleConv2d

BatchEnsemble convolutional layer based on [WTB20].

BatchEnsembleLinear

BatchEnsemble linear layer based on [WTB20].

BayesConv2d

Implementation of a Bayesian convolutional layer based on [BCKW15].

BayesLinear

Implement a Bayesian linear layer based on [BCKW15].

DropConnectLinear

Custom Linear layer with DropConnect applied to weights during training based on [MYM+21].

HeteroscedasticLayer

A unified PyTorch implementation of the Heteroscedastic layer based on [CMK+21].

IRDHead

Head that converts encoded features into Dirichlet concentration parameters (alpha).

IntBatchNorm1d

Interval-valued batch normalization for 1D features based on [WCM+24].

IntBatchNorm2d

Interval-valued batch normalization for 2D feature maps based on [WCM+24].

IntConv2d

Interval-arithmetic 2D convolution based on [WCM+24].

IntLinear

Interval-arithmetic linear layer based on [WCM+24].

IntSoftmax

Interval SoftMax head based on [WCM+24].

NatPNClassHead

Dirichlet posterior head for evidential classification.

NatPNRegHead

Gaussian posterior head for evidential regression.

NormalInverseGammaLinear

Custom Linear layer for a normal-inverse-gamma-distribution based on [ASSR20].

RadialNormalizingFlow

Radial normalizing flow based on [RM15].

RadialNormalizingFlowStack

Stack of radial normalizing flows based on [RM15].

RegressionHead

Head that converts encoded features into evidential Normal-Gamma parameters.

SNGPLayer

Spectral-normalized Neural Gaussian Process (SNGP) layer based on [LLP+20].

SpectralNormWithMultiplier

Applies spectral normalization with a bounded multiplier to a module's weight suggested by [LLP+20].

Functions

pack_interval

Promote x to a packed interval tensor with lo == hi == x.

unpack_interval

Split a packed interval tensor on channel_dim into its (lo, hi) halves.