mirror of
https://github.com/wassname/denoising-diffusion-pytorch.git
synced 2026-08-29 11:17:58 +08:00
fix torch.cumprod
This commit is contained in:
@@ -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