From 65d5f6c694e73792e40ed693a1381a792da8d277 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Tue, 3 Aug 2021 19:14:16 +0200 Subject: Fix bugs in converting text in mappings, add missing word_piece arg in datamodule --- training/conf/criterion/label_smoothing.yaml | 2 +- training/conf/datamodule/iam_extended_paragraphs.yaml | 1 + training/conf/mapping/emnist.yaml | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 training/conf/mapping/emnist.yaml (limited to 'training') diff --git a/training/conf/criterion/label_smoothing.yaml b/training/conf/criterion/label_smoothing.yaml index 684b5bb..45190e5 100644 --- a/training/conf/criterion/label_smoothing.yaml +++ b/training/conf/criterion/label_smoothing.yaml @@ -1,3 +1,3 @@ _target_: text_recognizer.criterions.label_smoothing.LabelSmoothingLoss smoothing: 0.1 -ignore_index: 1002 +ignore_index: 1000 diff --git a/training/conf/datamodule/iam_extended_paragraphs.yaml b/training/conf/datamodule/iam_extended_paragraphs.yaml index 2d1a03e..a2dd293 100644 --- a/training/conf/datamodule/iam_extended_paragraphs.yaml +++ b/training/conf/datamodule/iam_extended_paragraphs.yaml @@ -4,3 +4,4 @@ num_workers: 12 train_fraction: 0.8 augment: true pin_memory: false +word_pieces: true diff --git a/training/conf/mapping/emnist.yaml b/training/conf/mapping/emnist.yaml new file mode 100644 index 0000000..14e966b --- /dev/null +++ b/training/conf/mapping/emnist.yaml @@ -0,0 +1,2 @@ +_target_: text_recognizer.data.emnist_mapping.EmnistMapping +extra_symbols: [ "\n" ] -- cgit v1.2.3-70-g09d2