diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-09-18 17:44:19 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-09-18 17:44:19 +0200 |
commit | f9ede1e61008ead9b7abe910dff79067cf862312 (patch) | |
tree | d6d9b98e6e40c03c2bc3f422083de57fd548761c /text_recognizer/networks/vqvae | |
parent | 71ffa32966c7cc60802244c5e16998da5c5c3ce4 (diff) |
Add comment for quantization
Diffstat (limited to 'text_recognizer/networks/vqvae')
-rw-r--r-- | text_recognizer/networks/vqvae/vqvae.py | 1 |
1 files changed, 1 insertions, 0 deletions
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 |