diff options
Diffstat (limited to 'text_recognizer/data')
-rw-r--r-- | text_recognizer/data/iam_paragraphs.py | 1 | ||||
-rw-r--r-- | text_recognizer/data/mappings.py | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/text_recognizer/data/iam_paragraphs.py b/text_recognizer/data/iam_paragraphs.py index 7ba1077..0f3a2ce 100644 --- a/text_recognizer/data/iam_paragraphs.py +++ b/text_recognizer/data/iam_paragraphs.py @@ -39,6 +39,7 @@ class IAMParagraphs(BaseDataModule): """IAM handwriting database paragraphs.""" num_classes: int = attr.ib() + word_pieces: bool = attr.ib(default=False) augment: bool = attr.ib(default=True) train_fraction: float = attr.ib(default=0.8) dims: Tuple[int, int, int] = attr.ib( diff --git a/text_recognizer/data/mappings.py b/text_recognizer/data/mappings.py index a934fd9..b69e888 100644 --- a/text_recognizer/data/mappings.py +++ b/text_recognizer/data/mappings.py @@ -4,7 +4,7 @@ from pathlib import Path from typing import Dict, List, Optional, Union, Set, Sequence import attr -from loguru import logger +import loguru.logger as log import torch from torch import Tensor @@ -87,7 +87,7 @@ class WordPieceMapping(EmnistMapping): if self.data_dir is None else Path(self.data_dir) ) - logger.debug(f"Using data dir: {self.data_dir}") + log.debug(f"Using data dir: {self.data_dir}") if not self.data_dir.exists(): raise RuntimeError(f"Could not locate iamdb directory at {self.data_dir}") |