Skip to contents

Mean over samples of the squared L2 error between true and predicted noise.

Usage

morie_kamath_ch9_ldm_loss(epsilon, z_t, H_X, eps_net = NULL, t = NULL)

Arguments

epsilon

True noise (rows are samples).

z_t

Latent.

H_X

Conditioning.

eps_net

Prediction or function.

t

Timestep.

Value

List with estimate, per_sample.

Examples

morie_kamath_ch9_ldm_loss(matrix(c(1, 0, 2, 1), 2), NULL, NULL,
    eps_net = matrix(c(1, 0, 1, 0), 2))
#> $estimate
#> [1] 1
#> 
#> $per_sample
#> [1] 1 1
#> 
#> $n
#> [1] 2
#> 
#> $method
#> [1] "conditional LDM noise-prediction loss (Kamath Eq 9.20)"
#>