Apply the block to a Tensor, conditioned on a timestep embedding. :param x: an [N x C x ...] Tensor of features. :param emb: an [N x emb_channels] Tensor of timestep embeddings. :return: an [N x C x ...] Tensor of outputs.
(self, x, emb)
| 244 | self.skip_connection = conv_nd(dims, channels, self.out_channels, 1) |
| 245 | |
| 246 | def forward(self, x, emb): |
| 247 | """ |
| 248 | Apply the block to a Tensor, conditioned on a timestep embedding. |
| 249 | :param x: an [N x C x ...] Tensor of features. |
| 250 | :param emb: an [N x emb_channels] Tensor of timestep embeddings. |
| 251 | :return: an [N x C x ...] Tensor of outputs. |
| 252 | """ |
| 253 | return checkpoint( |
| 254 | self._forward, (x, emb), self.parameters(), self.use_checkpoint |
| 255 | ) |
| 256 | |
| 257 | |
| 258 | def _forward(self, x, emb): |
nothing calls this directly
no test coverage detected