(self, x_start, x_t, t)
| 309 | ) |
| 310 | |
| 311 | def q_posterior(self, x_start, x_t, t): |
| 312 | posterior_mean = ( |
| 313 | extract_into_tensor(self.posterior_mean_coef1, t, x_t.shape) * x_start + |
| 314 | extract_into_tensor(self.posterior_mean_coef2, t, x_t.shape) * x_t |
| 315 | ) |
| 316 | posterior_variance = extract_into_tensor(self.posterior_variance, t, x_t.shape) |
| 317 | posterior_log_variance_clipped = extract_into_tensor(self.posterior_log_variance_clipped, t, x_t.shape) |
| 318 | return posterior_mean, posterior_variance, posterior_log_variance_clipped |
| 319 | |
| 320 | def p_mean_variance(self, x, t, clip_denoised: bool): |
| 321 | model_out = self.model(x, t) |
no test coverage detected