From 9b6c99172f80b45030279e7268aaa80e5a1ed574 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Wed, 26 Jan 2022 23:17:14 +0100 Subject: fix: lint and format --- text_recognizer/data/iam_paragraphs.py | 5 +---- text_recognizer/data/iam_synthetic_paragraphs.py | 8 +------- 2 files changed, 2 insertions(+), 11 deletions(-) (limited to 'text_recognizer/data') diff --git a/text_recognizer/data/iam_paragraphs.py b/text_recognizer/data/iam_paragraphs.py index a8d5e0d..033b93e 100644 --- a/text_recognizer/data/iam_paragraphs.py +++ b/text_recognizer/data/iam_paragraphs.py @@ -86,10 +86,7 @@ class IAMParagraphs(BaseDataModule): length=self.output_dims[0], ) return BaseDataset( - data, - targets, - transform=transform, - target_transform=target_transform, + data, targets, transform=transform, target_transform=target_transform, ) log.info(f"Loading IAM paragraph regions and lines for {stage}...") diff --git a/text_recognizer/data/iam_synthetic_paragraphs.py b/text_recognizer/data/iam_synthetic_paragraphs.py index 351e052..ea59098 100644 --- a/text_recognizer/data/iam_synthetic_paragraphs.py +++ b/text_recognizer/data/iam_synthetic_paragraphs.py @@ -46,13 +46,7 @@ class IAMSyntheticParagraphs(IAMParagraphs): log.info("Preparing IAM lines for synthetic paragraphs dataset.") log.info("Cropping IAM line regions and loading labels.") - iam = IAM( - mapping=EmnistMapping( - extra_symbols={ - NEW_LINE_TOKEN, - } - ) - ) + iam = IAM(mapping=EmnistMapping(extra_symbols=(NEW_LINE_TOKEN,))) iam.prepare_data() crops_train, labels_train = line_crops_and_labels(iam, "train") -- cgit v1.2.3-70-g09d2