Get the distribution q(x_t | x_0).
(self, x_start, t)
| 188 | """ Training """ |
| 189 | |
| 190 | def q_mean_variance(self, x_start, t): |
| 191 | """ |
| 192 | Get the distribution q(x_t | x_0). |
| 193 | """ |
| 194 | mean = (extract_into_tensor(self.sqrt_alphas_cumprod, t, x_start.shape) * x_start) |
| 195 | variance = extract_into_tensor(1.0 - self.alphas_cumprod, t, x_start.shape) |
| 196 | log_variance = extract_into_tensor(self.log_one_minus_alphas_cumprod, t, x_start.shape) |
| 197 | return mean, variance, log_variance |
| 198 | |
| 199 | def q_sample(self, x_start, t, noise=None): |
| 200 | """ |
no test coverage detected