(
self,
x: torch.Tensor,
return_reg_log: bool = False,
unregularized: bool = False,
)
| 216 | return self.decoder.get_last_layer() |
| 217 | |
| 218 | def encode( |
| 219 | self, |
| 220 | x: torch.Tensor, |
| 221 | return_reg_log: bool = False, |
| 222 | unregularized: bool = False, |
| 223 | ) -> Union[torch.Tensor, Tuple[torch.Tensor, dict]]: |
| 224 | z = self.encoder(x) |
| 225 | if unregularized: |
| 226 | return z, dict() |
| 227 | z, reg_log = self.regularization(z) |
| 228 | if return_reg_log: |
| 229 | return z, reg_log |
| 230 | return z |
| 231 | |
| 232 | def decode(self, z: torch.Tensor, **kwargs) -> torch.Tensor: |
| 233 | x = self.decoder(z, **kwargs) |
no outgoing calls
no test coverage detected