Common#
Samples from gaussian with specified shape, dtype, device using torch.randn |
|
Samples from gaussian like the tensor x using torch.randn_like |
|
Samples ints from uniform distribution using torch.randint |
|
Normalize input to \([-1, 1]\) linearly |
|
Denormalize input normalized to \([-1, 1]\) linearly back to \([0, 1]\) |
|
Visualize diffusion process given an array of histories |
|
helper for setting default values inside __init__ for LightningCLI |
- dmme.common.gaussian(shape, dtype=None, device=None)[source]#
Samples from gaussian with specified shape, dtype, device using torch.randn
- dmme.common.gaussian_like(x)[source]#
Samples from gaussian like the tensor x using torch.randn_like
- dmme.common.uniform_int(min, max, count=1, device=None)[source]#
Samples ints from uniform distribution using torch.randint
- dmme.common.denorm(x)[source]#
Denormalize input normalized to \([-1, 1]\) linearly back to \([0, 1]\)