MCPcopy Create free account
hub / github.com/Sin3DM/Sin3DM / forward

Method forward

src/diffusion/unet_triplane.py:257–267  ·  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

255 self.skip_connection = TriplaneConv(channels, self.out_channels, 1, padding=0, is_rollout=False)
256
257 def forward(self, x, emb):
258 """
259 Apply the block to a Tensor, conditioned on a timestep embedding.
260
261 :param x: an [N x C x ...] Tensor of features.
262 :param emb: an [N x emb_channels] Tensor of timestep embeddings.
263 :return: an [N x C x ...] Tensor of outputs.
264 """
265 return checkpoint(
266 self._forward, (x, emb), self.parameters(), self.use_checkpoint
267 )
268
269 def _forward(self, x, emb):
270 # x: (h_xy, h_xz, h_yz)

Callers

nothing calls this directly

Calls 1

checkpointFunction · 0.85

Tested by

no test coverage detected