Skip to content
Snippets Groups Projects
Commit 4b8d8cdc authored by lukas leufen's avatar lukas leufen
Browse files

added check, if lr_decay is set

parent 01d0fca0
No related branches found
No related tags found
3 merge requests!90WIP: new release update,!89Resolve "release branch / CI on gpu",!73Resolve "lr_decay should be optional"
Pipeline #31864 passed
......@@ -70,11 +70,12 @@ class ModelSetup(RunEnvironment):
Set all callbacks for the training phase. Add all callbacks with the .add_callback statement. Finally, the
advanced model checkpoint is added.
"""
lr = self.data_store.get("lr_decay", scope="general.model")
lr = self.data_store.get_default("lr_decay", scope="general.model", default=None)
hist = HistoryAdvanced()
self.data_store.set("hist", hist, scope="general.model")
callbacks = CallbackHandler()
callbacks.add_callback(lr, self.callbacks_name % "lr", "lr")
if lr:
callbacks.add_callback(lr, self.callbacks_name % "lr", "lr")
callbacks.add_callback(hist, self.callbacks_name % "hist", "hist")
callbacks.create_model_checkpoint(filepath=self.checkpoint_name, verbose=1, monitor='val_loss',
save_best_only=True, mode='auto')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment