MCPcopy Create free account
hub / github.com/bbaaii/DreamDiffusion / forward

Method forward

code/dc_ldm/modules/diffusionmodules/openaimodel.py:245–254  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

checkpointFunction · 0.90

Tested by

no test coverage detected