diff options
author | aktersnurra <gustaf.rydholm@gmail.com> | 2020-11-15 17:40:44 +0100 |
---|---|---|
committer | aktersnurra <gustaf.rydholm@gmail.com> | 2020-11-15 17:40:44 +0100 |
commit | 75909723fa2b1f6245d5c5422e4f2e88b8a26052 (patch) | |
tree | e60c37d05c724db011d75adf9313d93839d193ac /src/training | |
parent | cad676fc423efeafde65f03e4815248f2d357011 (diff) |
Able to generate support files for lines datasets.
Diffstat (limited to 'src/training')
-rw-r--r-- | src/training/run_experiment.py | 6 |
1 files changed, 2 insertions, 4 deletions
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 |