From 75909723fa2b1f6245d5c5422e4f2e88b8a26052 Mon Sep 17 00:00:00 2001 From: aktersnurra Date: Sun, 15 Nov 2020 17:40:44 +0100 Subject: Able to generate support files for lines datasets. --- src/training/run_experiment.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/training') diff --git a/src/training/run_experiment.py b/src/training/run_experiment.py index e6ae84c..55a9572 100644 --- a/src/training/run_experiment.py +++ b/src/training/run_experiment.py @@ -74,8 +74,7 @@ def _load_modules_and_arguments(experiment_config: Dict,) -> Tuple[Callable, Dic """Loads all modules and arguments.""" # Load the dataset module. dataset_args = experiment_config.get("dataset", {}) - datasets_module = importlib.import_module("text_recognizer.datasets") - dataset_ = getattr(datasets_module, dataset_args["type"]) + dataset_ = dataset_args["type"] # Import the model module and model arguments. models_module = importlib.import_module("text_recognizer.models") @@ -92,8 +91,7 @@ def _load_modules_and_arguments(experiment_config: Dict,) -> Tuple[Callable, Dic ) # Import network module and arguments. - network_module = importlib.import_module("text_recognizer.networks") - network_fn_ = getattr(network_module, experiment_config["network"]["type"]) + network_fn_ = experiment_config["network"]["type"] network_args = experiment_config["network"].get("args", {}) # Criterion -- cgit v1.2.3-70-g09d2