summaryrefslogtreecommitdiff
path: root/training/conf/network
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-07-28 15:14:55 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-07-28 15:14:55 +0200
commitc032ffb05a7ed86f8fe5d596f94e8997c558cae8 (patch)
treebf890ffd4c815db7d510cfb281d253b5728f70c6 /training/conf/network
parent524bf4351ac295bd4ff9914bb1f32eda7f7ff855 (diff)
Reformatting with attrs, config for encoder and decoder
Diffstat (limited to 'training/conf/network')
-rw-r--r--training/conf/network/decoder/transformer_decoder.yaml21
-rw-r--r--training/conf/network/encoder/efficientnet.yaml6
2 files changed, 27 insertions, 0 deletions
diff --git a/training/conf/network/decoder/transformer_decoder.yaml b/training/conf/network/decoder/transformer_decoder.yaml
new file mode 100644
index 0000000..60c5762
--- /dev/null
+++ b/training/conf/network/decoder/transformer_decoder.yaml
@@ -0,0 +1,21 @@
+_target_: text_recognizer.networks.transformer.Decoder
+dim: 256
+depth: 2
+num_heads: 8
+attn_fn: text_recognizer.networks.transformer.attention.Attention
+attn_kwargs:
+ num_heads: 8
+ dim_head: 64
+ dropout_rate: 0.2
+norm_fn: torch.nn.LayerNorm
+ff_fn: text_recognizer.networks.transformer.mlp.FeedForward
+ff_kwargs:
+ dim: 256
+ dim_out: null
+ expansion_factor: 4
+ glu: true
+ dropout_rate: 0.2
+rotary_emb: null
+rotary_emb_dim: null
+cross_attend: true
+pre_norm: true
diff --git a/training/conf/network/encoder/efficientnet.yaml b/training/conf/network/encoder/efficientnet.yaml
new file mode 100644
index 0000000..1b9c6da
--- /dev/null
+++ b/training/conf/network/encoder/efficientnet.yaml
@@ -0,0 +1,6 @@
+_target_: text_recognizer.networks.encoders.efficientnet.EfficientNet
+arch: b0
+out_channels: 1280
+stochastic_dropout_rate: 0.2
+bn_momentum: 0.99
+bn_eps: 1.0e-3