(
self,
x: torch.Tensor,
return_reg_log: bool = False,
unregularized: bool = False,
**kwargs,
)
| 200 | return self.decoder.get_last_layer() |
| 201 | |
| 202 | def encode( |
| 203 | self, |
| 204 | x: torch.Tensor, |
| 205 | return_reg_log: bool = False, |
| 206 | unregularized: bool = False, |
| 207 | **kwargs, |
| 208 | ) -> Union[torch.Tensor, Tuple[torch.Tensor, dict]]: |
| 209 | z = self.encoder(x, **kwargs) |
| 210 | if unregularized: |
| 211 | return z, dict() |
| 212 | z, reg_log = self.regularization(z) |
| 213 | if return_reg_log: |
| 214 | return z, reg_log |
| 215 | return z |
| 216 | |
| 217 | def decode(self, z: torch.Tensor, **kwargs) -> torch.Tensor: |
| 218 | x = self.decoder(z, **kwargs) |
no outgoing calls
no test coverage detected