summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-06-20 00:56:50 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-06-20 00:56:50 +0200
commit598fd271942884f852e98c82d6caedad425813a1 (patch)
tree19adb7c3960ecb4079cb02a8ee38812caee7a222
parent892137c4f1104edc9645c0e1e877b885816fa83c (diff)
Remove strides
-rw-r--r--text_recognizer/networks/efficientnet/efficientnet.py2
-rw-r--r--training/conf/network/conv_transformer.yaml5
2 files changed, 2 insertions, 5 deletions
diff --git a/text_recognizer/networks/efficientnet/efficientnet.py b/text_recognizer/networks/efficientnet/efficientnet.py
index 2a712d8..c94c748 100644
--- a/text_recognizer/networks/efficientnet/efficientnet.py
+++ b/text_recognizer/networks/efficientnet/efficientnet.py
@@ -36,7 +36,6 @@ class EfficientNet(nn.Module):
bn_eps: float = 1.0e-3,
depth: int = 7,
out_channels: int = 1280,
- stride: Tuple[int, int] = (2, 2),
) -> None:
super().__init__()
self.params = self._get_arch_params(arch)
@@ -44,7 +43,6 @@ class EfficientNet(nn.Module):
self.bn_momentum = bn_momentum
self.bn_eps = bn_eps
self.depth = depth
- self.stride = stride
self.out_channels: int = out_channels
self._conv_stem: nn.Sequential
self._blocks: nn.ModuleList
diff --git a/training/conf/network/conv_transformer.yaml b/training/conf/network/conv_transformer.yaml
index 90c2cb8..016416c 100644
--- a/training/conf/network/conv_transformer.yaml
+++ b/training/conf/network/conv_transformer.yaml
@@ -1,6 +1,6 @@
_target_: text_recognizer.networks.ConvTransformer
input_dims: [1, 1, 576, 640]
-hidden_dim: &hidden_dim 144
+hidden_dim: &hidden_dim 128
num_classes: 58
pad_index: 3
encoder:
@@ -11,7 +11,6 @@ encoder:
bn_eps: 1.0e-3
depth: 5
out_channels: *hidden_dim
- stride: [2, 1]
decoder:
_target_: text_recognizer.networks.transformer.Decoder
depth: 6
@@ -47,4 +46,4 @@ decoder:
pixel_embedding:
_target_: text_recognizer.networks.transformer.AxialPositionalEmbedding
dim: *hidden_dim
- shape: [18, 78]
+ shape: [18, 80]