MCPcopy Create free account
hub / github.com/MoonInTheRiver/DiffSinger / extract

Function extract

usr/diff/shallow_diffusion_tts.py:155–158  ·  view source on GitHub ↗
(a, t, x_shape)

Source from the content-addressed store, hash-verified

153# gaussian diffusion trainer class
154
155def extract(a, t, x_shape):
156 b, *_ = t.shape
157 out = a.gather(-1, t)
158 return out.reshape(b, *((1,) * (len(x_shape) - 1)))
159
160
161def noise_like(shape, device, repeat=False):

Callers 4

q_mean_varianceMethod · 0.70
q_posteriorMethod · 0.70
q_sampleMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected