summaryrefslogtreecommitdiff
path: root/src/text_recognizer/datasets/iam_lines_dataset.py
diff options
context:
space:
mode:
authoraktersnurra <gustaf.rydholm@gmail.com>2020-11-15 17:40:44 +0100
committeraktersnurra <gustaf.rydholm@gmail.com>2020-11-15 17:40:44 +0100
commit75909723fa2b1f6245d5c5422e4f2e88b8a26052 (patch)
treee60c37d05c724db011d75adf9313d93839d193ac /src/text_recognizer/datasets/iam_lines_dataset.py
parentcad676fc423efeafde65f03e4815248f2d357011 (diff)
Able to generate support files for lines datasets.
Diffstat (limited to 'src/text_recognizer/datasets/iam_lines_dataset.py')
-rw-r--r--src/text_recognizer/datasets/iam_lines_dataset.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/text_recognizer/datasets/iam_lines_dataset.py b/src/text_recognizer/datasets/iam_lines_dataset.py
index fdd2fe6..5ae142c 100644
--- a/src/text_recognizer/datasets/iam_lines_dataset.py
+++ b/src/text_recognizer/datasets/iam_lines_dataset.py
@@ -36,6 +36,8 @@ class IamLinesDataset(Dataset):
pad_token: Optional[str] = None,
eos_token: Optional[str] = None,
) -> None:
+ self.pad_token = "_" if pad_token is None else pad_token
+
super().__init__(
train=train,
subsample_fraction=subsample_fraction,