(self, x_start, x_t, t)
| 302 | ) |
| 303 | |
| 304 | def q_posterior(self, x_start, x_t, t): |
| 305 | posterior_mean = ( |
| 306 | extract_into_tensor(self.posterior_mean_coef1, t, x_t.shape) * x_start + |
| 307 | extract_into_tensor(self.posterior_mean_coef2, t, x_t.shape) * x_t |
| 308 | ) |
| 309 | posterior_variance = extract_into_tensor(self.posterior_variance, t, x_t.shape) |
| 310 | posterior_log_variance_clipped = extract_into_tensor(self.posterior_log_variance_clipped, t, x_t.shape) |
| 311 | return posterior_mean, posterior_variance, posterior_log_variance_clipped |
| 312 | |
| 313 | def p_mean_variance(self, x, t, clip_denoised: bool): |
| 314 | model_out = self.model(x, t) |
no test coverage detected