MCPcopy
hub / github.com/ermongroup/ddim / compute_alpha

Function compute_alpha

functions/denoising.py:4–7  ·  view source on GitHub ↗
(beta, t)

Source from the content-addressed store, hash-verified

2
3
4def compute_alpha(beta, t):
5 beta = torch.cat([torch.zeros(1).to(beta.device), beta], dim=0)
6 a = (1 - beta).cumprod(dim=0).index_select(0, t + 1).view(-1, 1, 1, 1)
7 return a
8
9
10def generalized_steps(x, seq, model, b, **kwargs):

Callers 2

generalized_stepsFunction · 0.85
ddpm_stepsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected