std1.0.0-beta-7 SafeC docs

std :: ml::diffusion

Function std::ddpm_sampler_step

#include <std/ml/diffusion.h> source · definition

&FloatTensor ddpm_sampler_step(
    const &FloatTensor x_t,
    const &FloatTensor epsPred,
    float beta_t,
    float alphaBar_t,
    const &FloatTensor noise,
)

x_{t-1} = (1/sqrt(1-beta_t)) * (x_t - beta_t/sqrt(1-alphaBar_t) * epsPred) + sqrt(beta_t) * noise Pass a zero tensor for 'noise' to get the deterministic (posterior- mean-only) step — useful for verification, matching how the rest of std/ml avoids baking in an RNG (see rnn.h's header comment).