Draws samples from an lognormal distribution.
(shape, loc=0., scale=1., device='cpu', dtype=torch.float32)
| 322 | |
| 323 | |
| 324 | def rand_log_normal(shape, loc=0., scale=1., device='cpu', dtype=torch.float32): |
| 325 | """Draws samples from an lognormal distribution.""" |
| 326 | u = stratified_with_settings(shape, device=device, dtype=dtype) * (1 - 2e-7) + 1e-7 |
| 327 | return torch.distributions.Normal(loc, scale).icdf(u).exp() |
| 328 | |
| 329 | |
| 330 | def rand_log_logistic(shape, loc=0., scale=1., min_value=0., max_value=float('inf'), device='cpu', dtype=torch.float32): |
nothing calls this directly
no test coverage detected