MCPcopy Create free account
hub / github.com/TencentARC/AnimeGamer / forward

Method forward

VDM_Decoder/vae_modules/autoencoder.py:236–239  ·  view source on GitHub ↗
(self, x: torch.Tensor, **additional_decode_kwargs)

Source from the content-addressed store, hash-verified

234 return x
235
236 def forward(self, x: torch.Tensor, **additional_decode_kwargs) -> Tuple[torch.Tensor, torch.Tensor, dict]:
237 z, reg_log = self.encode(x, return_reg_log=True)
238 dec = self.decode(z, **additional_decode_kwargs)
239 return z, dec, reg_log
240
241 def inner_training_step(self, batch: dict, batch_idx: int, optimizer_idx: int = 0) -> torch.Tensor:
242 x = self.get_input(batch)

Callers

nothing calls this directly

Calls 2

encodeMethod · 0.95
decodeMethod · 0.95

Tested by

no test coverage detected