Skip to content
Snippets Groups Projects
Commit 5e0a5b21 authored by leufen1's avatar leufen1
Browse files

first fix, include custom objects in model loading

parent 444e91f4
Branches
Tags
4 merge requests!253include current develop,!252Resolve "release v1.3.0",!245update #275 branch,!242Resolve "BUG: loading of custom objects not working"
Pipeline #60032 passed
...@@ -145,7 +145,7 @@ class Training(RunEnvironment): ...@@ -145,7 +145,7 @@ class Training(RunEnvironment):
logging.info("Found locally stored model and checkpoints. Training is resumed from the last checkpoint.") logging.info("Found locally stored model and checkpoints. Training is resumed from the last checkpoint.")
self.callbacks.load_callbacks() self.callbacks.load_callbacks()
self.callbacks.update_checkpoint() self.callbacks.update_checkpoint()
self.model = keras.models.load_model(checkpoint.filepath) self.model = keras.models.load_model(checkpoint.filepath, self.model.custom_objects)
hist: History = self.callbacks.get_callback_by_name("hist") hist: History = self.callbacks.get_callback_by_name("hist")
initial_epoch = max(hist.epoch) + 1 initial_epoch = max(hist.epoch) + 1
_ = self.model.fit_generator(generator=self.train_set, _ = self.model.fit_generator(generator=self.train_set,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment