MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / make_beta_schedule

Function make_beta_schedule

sat/sgm/modules/diffusionmodules/util.py:20–28  ·  view source on GitHub ↗
(
    schedule,
    n_timestep,
    linear_start=1e-4,
    linear_end=2e-2,
)

Source from the content-addressed store, hash-verified

18
19
20def make_beta_schedule(
21 schedule,
22 n_timestep,
23 linear_start=1e-4,
24 linear_end=2e-2,
25):
26 if schedule == "linear":
27 betas = torch.linspace(linear_start**0.5, linear_end**0.5, n_timestep, dtype=torch.float64) ** 2
28 return betas.numpy()
29
30
31def extract_into_tensor(a, t, x_shape):

Callers 2

__init__Method · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected