Compute y_noisy according to (6) p15 of [2]
(self, t, y)
| 62 | return xt_prev_mean, var |
| 63 | |
| 64 | def noisy_image(self, t, y): |
| 65 | """ Compute y_noisy according to (6) p15 of [2]""" |
| 66 | noise = torch.randn_like(y) |
| 67 | y_noisy = extract_(self.sqrt_gammas, t, y.shape) * y + extract_(self.sqrt_one_minus_gammas, t, noise.shape) * noise |
| 68 | return y_noisy, noise |
| 69 | |
| 70 | def forward(self, x_T, cond, pre_ori='False'): |
| 71 | """ |