diff --git a/tinyflow/time_sampler.py b/tinyflow/time_sampler.py index 07d93fd..9da04e6 100644 --- a/tinyflow/time_sampler.py +++ b/tinyflow/time_sampler.py @@ -42,7 +42,7 @@ def __init__(self, scale: float = 0.5): def sample(self, *shape) -> Tensor: u = Tensor.rand(*shape) - c = (math.pi * u).cos() ** 2 + c = (math.pi / 2 * u).cos() ** 2 return 1 - u - self.s * (c - 1 + u) @@ -52,5 +52,5 @@ def __init__(self): def sample(self, *shape) -> Tensor: u = Tensor.rand(*shape) - t = 1 - 1 / ((math.pi * u).tan() + 1) + t = 1 - 1 / ((math.pi / 2 * u).tan() + 1) return t