diff options
-rw-r--r-- | models/model.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/models/model.py b/models/model.py index 3b54363..1a62bae 100644 --- a/models/model.py +++ b/models/model.py @@ -116,6 +116,13 @@ class Model: self.curr_iters, self.total_iters, dataset_selectors.items() ): print(f'Training model {condition} ...') + # Skip finished model + if curr_iter == total_iter: + continue + # Check invalid restore iter + elif curr_iter > total_iter: + raise ValueError("Restore iter '{}' should less than total " + "iter '{}'".format(curr_iter, total_iter)) self.curr_iter = curr_iter self.total_iter = total_iter self.fit( |