GaussianMatrixSampler#

class sdm.prior.GaussianMatrixSampler(normalize: bool = True)#

Bases: MatrixSampler

Sample random Gaussian matrices.

Parameters:

normalize (bool) – Add small Gaussian noise and L2-normalize rows.

sample(size: Size | tuple[int, ...], dtype: dtype, generator: Generator | None = None) → Tensor#

Sample random matrices.

Parameters:
  • size (Size | tuple[int, ...]) – Output shape [..., M, N] with M rows and N columns per matrix.

  • dtype (dtype) – Output dtype.

  • generator (Generator | None) – Pseudorandom generator.

Returns:

Random matrices with shape size.

Return type:

Tensor