Draws samples from an log-uniform distribution.
(shape, min_value, max_value, device='cpu', dtype=torch.float32)
| 338 | |
| 339 | |
| 340 | def rand_log_uniform(shape, min_value, max_value, device='cpu', dtype=torch.float32): |
| 341 | """Draws samples from an log-uniform distribution.""" |
| 342 | min_value = math.log(min_value) |
| 343 | max_value = math.log(max_value) |
| 344 | return (stratified_with_settings(shape, device=device, dtype=dtype) * (max_value - min_value) + min_value).exp() |
| 345 | |
| 346 | |
| 347 | def rand_v_diffusion(shape, sigma_data=1., min_value=0., max_value=float('inf'), device='cpu', dtype=torch.float32): |
nothing calls this directly
no test coverage detected