From 316c6a456c9b9f1964f77e8ba016651405c6f9c0 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Thu, 9 Jun 2022 22:30:45 +0200 Subject: Remove abstract mapping --- text_recognizer/data/emnist_lines.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'text_recognizer/data/emnist_lines.py') diff --git a/text_recognizer/data/emnist_lines.py b/text_recognizer/data/emnist_lines.py index 062257d..ba1b61c 100644 --- a/text_recognizer/data/emnist_lines.py +++ b/text_recognizer/data/emnist_lines.py @@ -16,7 +16,7 @@ from text_recognizer.data.base_data_module import ( ) from text_recognizer.data.base_dataset import BaseDataset, convert_strings_to_labels from text_recognizer.data.emnist import EMNIST -from text_recognizer.data.mappings import AbstractMapping +from text_recognizer.data.mappings import EmnistMapping from text_recognizer.data.transforms.load_transform import load_transform_from_file from text_recognizer.data.utils.sentence_generator import SentenceGenerator @@ -38,7 +38,7 @@ class EMNISTLines(BaseDataModule): def __init__( self, - mapping: Type[AbstractMapping], + mapping: Type[EmnistMapping], transform: Optional[Callable] = None, test_transform: Optional[Callable] = None, target_transform: Optional[Callable] = None, @@ -113,7 +113,6 @@ class EMNISTLines(BaseDataModule): """Loads the dataset.""" log.info("EMNISTLinesDataset loading data from HDF5...") if stage == "fit" or stage is None: - print(self.data_filename) with h5py.File(self.data_filename, "r") as f: x_train = f["x_train"][:] y_train = torch.LongTensor(f["y_train"][:]) -- cgit v1.2.3-70-g09d2