v-parameterization: sqrt(alpha_bar_t) * eps - sqrt(1 - alpha_bar_t) * x_0
(self, x_start, noise, t)
| 209 | return sqrt_alpha_cumprod_t * x_start + sqrt_one_minus_alpha_cumprod_t * noise |
| 210 | |
| 211 | def get_v(self, x_start, noise, t): |
| 212 | """ v-parameterization: sqrt(alpha_bar_t) * eps - sqrt(1 - alpha_bar_t) * x_0 """ |
| 213 | return ( |
| 214 | extract_into_tensor(self.sqrt_alphas_cumprod, t, x_start.shape) * noise - |
| 215 | extract_into_tensor(self.sqrt_one_minus_alphas_cumprod, t, x_start.shape) * x_start |
| 216 | ) |
| 217 | |
| 218 | def training_losses(self, model: nn.Module, x_start: Tensor, x_noise: Tensor = None, model_kwargs=None): |
| 219 | """ x_start = x_0 """ |
no test coverage detected