(self, input, noise, sigma, **kwargs)
| 242 | """L_simple with the Karras et al. preconditioner.""" |
| 243 | |
| 244 | def loss(self, input, noise, sigma, **kwargs): |
| 245 | noised_input = input + noise * utils.append_dims(sigma, input.ndim) |
| 246 | denoised = self(noised_input, sigma, **kwargs) |
| 247 | eps = sampling.to_d(noised_input, sigma, denoised) |
| 248 | return (eps - noise).pow(2).flatten(1).mean(1) |
| 249 | |
| 250 | |
| 251 | # Residual blocks |
nothing calls this directly
no outgoing calls
no test coverage detected