MCPcopy Index your code
hub / github.com/ImprintLab/MedSegDiff / add_noise

Method add_noise

guided_diffusion/dpm_solver.py:970–987  ·  view source on GitHub ↗

Compute the noised input xt = alpha_t * x + sigma_t * noise. Args: x: A `torch.Tensor` with shape `(batch_size, *shape)`. t: A `torch.Tensor` with shape `(t_size,)`. Returns: xt with shape `(t_size, batch_size, *shape)`.

(self, x, t, noise=None)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 3

expand_dimsFunction · 0.85
marginal_alphaMethod · 0.80
marginal_stdMethod · 0.80

Tested by

no test coverage detected