diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-08-04 15:15:26 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-08-04 15:15:26 +0200 |
commit | 04c40f790e405ced6e6b90cf0a8aea268b9345c4 (patch) | |
tree | d5e05ee09fa99ee8d56d5373bde18626274a1fdd /text_recognizer/networks/vqvae/quantizer.py | |
parent | d3afa310f77f47553586eeee58e3d3345a754e2c (diff) |
Add char htr experiment, rename from ocr to htr, vqvae loss collapses
Diffstat (limited to 'text_recognizer/networks/vqvae/quantizer.py')
-rw-r--r-- | text_recognizer/networks/vqvae/quantizer.py | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/text_recognizer/networks/vqvae/quantizer.py b/text_recognizer/networks/vqvae/quantizer.py index 5e0b602..1b59e78 100644 --- a/text_recognizer/networks/vqvae/quantizer.py +++ b/text_recognizer/networks/vqvae/quantizer.py @@ -83,8 +83,6 @@ class VectorQuantizer(nn.Module): def compute_ema(self, one_hot_encoding: Tensor, latent: Tensor) -> None: batch_cluster_size = one_hot_encoding.sum(axis=0) batch_embedding_avg = (latent.t() @ one_hot_encoding).t() - print(batch_cluster_size.shape) - print(self.embedding._cluster_size.shape) self.embedding._cluster_size.data.mul_(self.decay).add_( batch_cluster_size, alpha=1 - self.decay ) |