summaryrefslogtreecommitdiff
path: root/text_recognizer
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-09-18 17:42:39 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-09-18 17:42:39 +0200
commit0b8924f37fbab57a3d6f59421e9cd16421c9af4b (patch)
tree76f822b08fc16bd373669eab4d8af56269103bc2 /text_recognizer
parent5fca1bb6aeb48f106750d66b46317acf38cd8a10 (diff)
Add more residual blocks in vqvae
Diffstat (limited to 'text_recognizer')
-rw-r--r--text_recognizer/networks/vqvae/decoder.py2
-rw-r--r--text_recognizer/networks/vqvae/encoder.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/text_recognizer/networks/vqvae/decoder.py b/text_recognizer/networks/vqvae/decoder.py
index 1194573..5279cbd 100644
--- a/text_recognizer/networks/vqvae/decoder.py
+++ b/text_recognizer/networks/vqvae/decoder.py
@@ -31,7 +31,7 @@ class Decoder(nn.Module):
def _build_decompression_block(self,) -> nn.Sequential:
in_channels = self.hidden_dim * self.channels_multipliers[0]
decoder = []
- for _ in range(2):
+ for _ in range(4):
decoder += [
Residual(
in_channels=in_channels,
diff --git a/text_recognizer/networks/vqvae/encoder.py b/text_recognizer/networks/vqvae/encoder.py
index 06e6c18..fe5ef4b 100644
--- a/text_recognizer/networks/vqvae/encoder.py
+++ b/text_recognizer/networks/vqvae/encoder.py
@@ -57,7 +57,7 @@ class Encoder(nn.Module):
activation_fn,
]
- for _ in range(2):
+ for _ in range(4):
encoder += [
Residual(
in_channels=self.hidden_dim * self.channels_multipliers[-1],