From f9ede1e61008ead9b7abe910dff79067cf862312 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Sat, 18 Sep 2021 17:44:19 +0200 Subject: Add comment for quantization --- text_recognizer/networks/vqvae/vqvae.py | 1 + 1 file changed, 1 insertion(+) (limited to 'text_recognizer/networks') diff --git a/text_recognizer/networks/vqvae/vqvae.py b/text_recognizer/networks/vqvae/vqvae.py index e8660c4..f31b062 100644 --- a/text_recognizer/networks/vqvae/vqvae.py +++ b/text_recognizer/networks/vqvae/vqvae.py @@ -38,6 +38,7 @@ class VQVAE(nn.Module): return self.pre_codebook_conv(z_e) def quantize(self, z_e: Tensor) -> Tuple[Tensor, Tensor]: + """Quantizes the encoded latent vectors.""" z_q, vq_loss = self.quantizer(z_e) return z_q, vq_loss -- cgit v1.2.3-70-g09d2