MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / forward

Method forward

sat/sgm/models/autoencoder.py:221–224  ·  view source on GitHub ↗
(self, x: torch.Tensor, **additional_decode_kwargs)

Source from the content-addressed store, hash-verified

219 return x
220
221 def forward(self, x: torch.Tensor, **additional_decode_kwargs) -> Tuple[torch.Tensor, torch.Tensor, dict]:
222 z, reg_log = self.encode(x, return_reg_log=True)
223 dec = self.decode(z, **additional_decode_kwargs)
224 return z, dec, reg_log
225
226 def inner_training_step(self, batch: dict, batch_idx: int, optimizer_idx: int = 0) -> torch.Tensor:
227 x = self.get_input(batch)

Callers

nothing calls this directly

Calls 2

encodeMethod · 0.95
decodeMethod · 0.95

Tested by

no test coverage detected