summaryrefslogtreecommitdiff
path: root/training/conf/experiment/conv_transformer_paragraphs_wp.yaml
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-10-25 22:32:10 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-10-25 22:32:10 +0200
commit41c3e99fe57874ba1855c893bf47087d474ec6b8 (patch)
tree2ba286209251f7ec8d7ab4cf061cffe5de86f398 /training/conf/experiment/conv_transformer_paragraphs_wp.yaml
parentda29c1cf4d062087f1b29dc9402ee6384203b690 (diff)
Updates to configs
Diffstat (limited to 'training/conf/experiment/conv_transformer_paragraphs_wp.yaml')
-rw-r--r--training/conf/experiment/conv_transformer_paragraphs_wp.yaml39
1 files changed, 20 insertions, 19 deletions
diff --git a/training/conf/experiment/conv_transformer_paragraphs_wp.yaml b/training/conf/experiment/conv_transformer_paragraphs_wp.yaml
index 499a609..ebaa17a 100644
--- a/training/conf/experiment/conv_transformer_paragraphs_wp.yaml
+++ b/training/conf/experiment/conv_transformer_paragraphs_wp.yaml
@@ -1,3 +1,5 @@
+# @package _global_
+
defaults:
- override /mapping: null
- override /criterion: null
@@ -7,7 +9,6 @@ defaults:
- override /lr_schedulers: null
- override /optimizers: null
-
epochs: &epochs 1000
ignore_index: &ignore_index 1000
num_classes: &num_classes 1006
@@ -17,17 +18,17 @@ summary: [[1, 1, 576, 640], [1, 451]]
criterion:
_target_: torch.nn.CrossEntropyLoss
ignore_index: *ignore_index
-
-mapping:
- _target_: text_recognizer.data.word_piece_mapping.WordPieceMapping
- num_features: 1000
- tokens: iamdb_1kwp_tokens_1000.txt
- lexicon: iamdb_1kwp_lex_1000.txt
- data_dir: null
- use_words: false
- prepend_wordsep: false
- special_tokens: [ <s>, <e>, <p> ]
- extra_symbols: [ "\n" ]
+
+mapping: &mapping
+ mapping:
+ _target_: text_recognizer.data.mappings.word_piece_mapping.WordPieceMapping
+ num_features: 1000
+ tokens: iamdb_1kwp_tokens_1000.txt
+ lexicon: iamdb_1kwp_lex_1000.txt
+ use_words: false
+ prepend_wordsep: false
+ special_tokens: [ <s>, <e>, <p> ]
+ extra_symbols: [ "\n" ]
callbacks:
stochastic_weight_averaging:
@@ -41,7 +42,7 @@ callbacks:
optimizers:
madgrad:
_target_: madgrad.MADGRAD
- lr: 3.0e-4
+ lr: 1.0e-4
momentum: 0.9
weight_decay: 0
eps: 1.0e-6
@@ -71,13 +72,13 @@ lr_schedulers:
datamodule:
_target_: text_recognizer.data.iam_extended_paragraphs.IAMExtendedParagraphs
- batch_size: 4
num_workers: 12
- train_fraction: 0.8
- augment: true
+ train_fraction: 0.9
pin_memory: true
- word_pieces: true
- resize: null
+ transform: transform/paragraphs.yaml
+ test_transform: transform/paragraphs.yaml
+ target_transform: target_transform/word_piece.yaml
+ << : *mapping
network:
_target_: text_recognizer.networks.conv_transformer.ConvTransformer
@@ -138,7 +139,7 @@ trainer:
stochastic_weight_avg: true
auto_scale_batch_size: binsearch
auto_lr_find: false
- gradient_clip_val: 0.0
+ gradient_clip_val: 0.5
fast_dev_run: false
gpus: 1
precision: 16