mirror of
https://github.com/wassname/denoising-diffusion-pytorch.git
synced 2026-10-15 12:50:11 +08:00
fix torch.cumprod
This commit is contained in:
1 parent
e0a1bed31a
commit
d85b8bbe2e
1 file changed
+1
-1
@@ -450,7 +450,7 @@ class GaussianDiffusion(nn.Module):
|
||||
raise ValueError(f'unknown beta schedule {beta_schedule}')
|
||||
|
||||
alphas = 1. - betas
|
||||
alphas_cumprod = torch.cumprod(alphas, axis=0)
|
||||
alphas_cumprod = torch.cumprod(alphas, dim=0)
|
||||
alphas_cumprod_prev = F.pad(alphas_cumprod[:-1], (1, 0), value = 1.)
|
||||
|
||||
timesteps, = betas.shape
|
||||
|
||||
Reference in new issue
Block a user