Commit
·
ce11880
1
Parent(s):
81c4b3f
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,10 @@ def linear_beta_schedule(timesteps):
|
|
| 12 |
beta_start = 0.0001
|
| 13 |
beta_end = 0.02
|
| 14 |
return torch.linspace(beta_start, beta_end, timesteps)
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
| 16 |
alphas = 1. - betas
|
| 17 |
alphas_cumprod = torch.cumprod(alphas, axis=0)
|
| 18 |
alphas_cumprod_prev = F.pad(alphas_cumprod[:-1], (1, 0), value=1.0)
|
|
|
|
| 12 |
beta_start = 0.0001
|
| 13 |
beta_end = 0.02
|
| 14 |
return torch.linspace(beta_start, beta_end, timesteps)
|
| 15 |
+
|
| 16 |
+
timesteps= 300
|
| 17 |
+
betas = linear_beta_schedule(timesteps=timesteps)
|
| 18 |
+
|
| 19 |
alphas = 1. - betas
|
| 20 |
alphas_cumprod = torch.cumprod(alphas, axis=0)
|
| 21 |
alphas_cumprod_prev = F.pad(alphas_cumprod[:-1], (1, 0), value=1.0)
|