(self, x)
| 471 | print(f"Restored from {path}") |
| 472 | |
| 473 | def encode(self, x): |
| 474 | h = self.encoder(x) |
| 475 | moments = self.quant_conv(h) |
| 476 | if not self.use_variational: |
| 477 | moments = torch.cat((moments, torch.ones_like(moments)), 1) |
| 478 | posterior = DiagonalGaussianDistribution(moments) |
| 479 | return posterior |
| 480 | |
| 481 | def decode(self, z): |
| 482 | z = self.post_quant_conv(z) |
no test coverage detected