:param x: an [N x C x T] tensor. :param t: an [N] tensor. :return: an [N x C' x T] tensor.
(self, x: torch.Tensor, t: torch.Tensor)
| 193 | self.output_proj.bias.zero_() |
| 194 | |
| 195 | def forward(self, x: torch.Tensor, t: torch.Tensor): |
| 196 | """ |
| 197 | :param x: an [N x C x T] tensor. |
| 198 | :param t: an [N] tensor. |
| 199 | :return: an [N x C' x T] tensor. |
| 200 | """ |
| 201 | assert x.shape[-1] == self.n_ctx |
| 202 | t_embed = self.time_embed(timestep_embedding(t, self.backbone.width)) |
| 203 | return self._forward_with_cond(x, [(t_embed, self.time_token_cond)]) |
| 204 | |
| 205 | def _forward_with_cond( |
| 206 | self, x: torch.Tensor, cond_as_token: List[Tuple[torch.Tensor, bool]] |
nothing calls this directly
no test coverage detected