torchadf.nn.modules.linear.Linear

class torchadf.nn.modules.linear.Linear(in_features, out_features, bias=True, device=None, dtype=None, mode='diag')

A dense (fully connected) linear layer.

Assumed Density Filtering (ADF) version of torch.nn.Linear.

Parameters:
in_featurestorch.Tensor

Size of each input samples.

out_featurestorch.Tensor

Size of each output sample.

biasbool, optional

Add a learnable bias to the linear layer (Default True).

mode{“diag”, “diagonal”, “lowrank”, “half”, “full”}, optional

Covariance propagation mode (Default “diag”).