RootSampler#

class sdm.prior.RootSampler#

Bases: ABC

Base class for sampling values at nodes without parents.

abstractmethod sample(num_rows: int, channels: int, generator: Generator | None = None) → Tensor#

Sample root values with shape [R, H] for rows and channels.

Parameters:
  • num_rows (int) – Number of rows.

  • channels (int) – Number of output channels.

  • generator (Generator | None) – Pseudorandom generator.

Return type:

Tensor