(self)
| 106 | config: VQGANConfig |
| 107 | |
| 108 | def setup(self): |
| 109 | self.encoder = Encoder(self.config) |
| 110 | self.decoder = Decoder(self.config) |
| 111 | self.quantize = VectorQuantizer( |
| 112 | self.config.num_embeddings, self.config.quantized_embed_dim |
| 113 | ) |
| 114 | self.quant_conv = nn.Conv(self.config.quantized_embed_dim, [1, 1]) |
| 115 | self.post_quant_conv = nn.Conv(self.config.z_channels, [1, 1]) |
| 116 | |
| 117 | def encode(self, pixel_values): |
| 118 | T = None |
nothing calls this directly
no test coverage detected