SigmaGenerator
- class deepinv.physics.generator.SigmaGenerator(sigma_min=0.01, sigma_max=0.5, rng: Generator | None = None, device: str = 'cpu', dtype: dtype = torch.float32)[source]
Bases:
PhysicsGenerator
Generator for the noise level \(\sigma\) in the Gaussian noise model.
The noise level is sampled uniformly from the interval \([\text{sigma_min}, \text{sigma_max}]\).
- Parameters:
sigma_min (float) – minimum noise level
sigma_max (float) – maximum noise level
rng (torch.Generator) – random number generator
device (str) – device where the tensor is stored
dtype (torch.dtype) – data type of the generated tensor
- Examples:
>>> from deepinv.physics.generator import SigmaGenerator >>> generator = SigmaGenerator() >>> sigma_dict = generator.step(seed=0) # dict_keys(['sigma']) >>> print(sigma_dict['sigma']) tensor([0.2532])