ActivationMatrixSampler#
- class sdm.prior.ActivationMatrixSampler(matrix_sampler: MatrixSampler, activation: Activation, normalize: bool = True)#
Bases:
MatrixSamplerSample a base matrix and apply a random activation.
Activation operates on flattened matrix entries before adding Gaussian noise of scale
1e-3.- Parameters:
matrix_sampler (MatrixSampler) – Base matrix sampler; use
normalize=Falsefor raw inputs.activation (Activation) – Activation applied to flattened matrix entries.
normalize (bool) – Add small Gaussian noise and L2-normalize output rows.