(self, x: torch.FloatTensor, return_dict: bool = True)
| 117 | ) |
| 118 | |
| 119 | def encode(self, x: torch.FloatTensor, return_dict: bool = True) -> VQEncoderOutput: |
| 120 | h = self.encoder(x) |
| 121 | h = self.quant_conv(h) |
| 122 | |
| 123 | if not return_dict: |
| 124 | return (h,) |
| 125 | |
| 126 | return VQEncoderOutput(latents=h) |
| 127 | |
| 128 | def decode( |
| 129 | self, h: torch.FloatTensor, force_not_quantize: bool = False, return_dict: bool = True |
no test coverage detected