Mentions légales du service

Skip to content
Snippets Groups Projects
Commit b9a38d2a authored by PaulWawerek-L's avatar PaulWawerek-L
Browse files

allow_resume_more_epochs

parent d45300f0
No related branches found
No related tags found
1 merge request!2OSLO-IC
...@@ -509,9 +509,13 @@ def main(): ...@@ -509,9 +509,13 @@ def main():
optimizer_aux.load_state_dict((checkpoint["optimizer_aux_state_dict"])) optimizer_aux.load_state_dict((checkpoint["optimizer_aux_state_dict"]))
list_mean_losses = checkpoint["list_mean_losses"] list_mean_losses = checkpoint["list_mean_losses"]
epoch_delta = args.max_epochs - len(list_mean_losses)
# allow for resuming training with more epochs
if epoch_delta > 0: list_mean_losses.extend([None] * (epoch_delta))
if "list_mean_losses_validation" in checkpoint: if "list_mean_losses_validation" in checkpoint:
list_mean_losses_validation = checkpoint["list_mean_losses_validation"] list_mean_losses_validation = checkpoint["list_mean_losses_validation"]
if epoch_delta > 0: list_mean_losses.extend([None] * (epoch_delta))
if not args.no_scheduler: if not args.no_scheduler:
if "scheduler_state_dict" in checkpoint: if "scheduler_state_dict" in checkpoint:
......
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