diff options
author | aktersnurra <gustaf.rydholm@gmail.com> | 2020-09-09 23:31:31 +0200 |
---|---|---|
committer | aktersnurra <gustaf.rydholm@gmail.com> | 2020-09-09 23:31:31 +0200 |
commit | 2b63fd952bdc9c7c72edd501cbcdbf3231e98f00 (patch) | |
tree | 1c0e0898cb8b66faff9e5d410aa1f82d13542f68 /src/text_recognizer/models | |
parent | e1b504bca41a9793ed7e88ef14f2e2cbd85724f2 (diff) |
Created an abstract Dataset class for common methods.
Diffstat (limited to 'src/text_recognizer/models')
-rw-r--r-- | src/text_recognizer/models/base.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/text_recognizer/models/base.py b/src/text_recognizer/models/base.py index 153e19a..d23fe56 100644 --- a/src/text_recognizer/models/base.py +++ b/src/text_recognizer/models/base.py @@ -140,6 +140,7 @@ class Model(ABC): if not self.data_prepared: # Load train dataset. train_dataset = self.dataset(train=True, **self.dataset_args["args"]) + train_dataset.load_or_generate_data() # Set input shape. self._input_shape = train_dataset.input_shape @@ -156,6 +157,7 @@ class Model(ABC): # Load test dataset. self.test_dataset = self.dataset(train=False, **self.dataset_args["args"]) + self.test_dataset.load_or_generate_data() # Set the flag to true to disable ability to load data agian. self.data_prepared = True |