(
x1: float = 256, y1: float = 0.5, x2: float = 4096, y2: float = 1.15
)
| 19 | |
| 20 | |
| 21 | def get_lin_function( |
| 22 | x1: float = 256, y1: float = 0.5, x2: float = 4096, y2: float = 1.15 |
| 23 | ): |
| 24 | m = (y2 - y1) / (x2 - x1) |
| 25 | b = y1 - m * x1 |
| 26 | return lambda x: m * x + b |
| 27 | |
| 28 | |
| 29 | def time_shift(mu: float, sigma: float, t: torch.Tensor): |