Compute the time-dependent conditional vector field ut = alpha_dt_t * x1 + sigma_dt_t * x0, see Eq. (7) in [3]. Args: x0 : Tensor, shape (bs, *dim), represents the source minibatch (noise) x1 : Tensor, shape (bs, *dim), represents the tar
(self, x0: Tensor, x1: Tensor, t: Tensor)
| 571 | return xt |
| 572 | |
| 573 | def compute_ut(self, x0: Tensor, x1: Tensor, t: Tensor): |
| 574 | """ |
| 575 | Compute the time-dependent conditional vector field |
| 576 | ut = alpha_dt_t * x1 + sigma_dt_t * x0, |
| 577 | see Eq. (7) in [3]. |
| 578 | |
| 579 | Args: |
| 580 | x0 : Tensor, shape (bs, *dim), represents the source minibatch (noise) |
| 581 | x1 : Tensor, shape (bs, *dim), represents the target minibatch (data) |
| 582 | t : FloatTensor, shape (bs,) represents the time in [0, 1] |
| 583 | Returns: |
| 584 | ut : conditional vector field |
| 585 | """ |
| 586 | t = pad_v_like_x(t, x0) |
| 587 | alpha_dt_t = self.schedule.alpha_dt_t(t) |
| 588 | sigma_dt_t = self.schedule.sigma_dt_t(t) |
| 589 | return alpha_dt_t * x1 + sigma_dt_t * x0 |
| 590 | |
| 591 | def training_losses(self, x1: Tensor, x0: Tensor = None, **cond_kwargs): |
| 592 | """ |
no test coverage detected