Skip to content

Commit

Permalink
Update metrics when continuing training
Browse files Browse the repository at this point in the history
  • Loading branch information
Subodh Malgonde authored and Subodh Malgonde committed Dec 20, 2017
1 parent 8a37601 commit 65e8696
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,19 @@ def save_model(sess, training_loss_metrics=None, validation_loss_metrics=None,
builder.save()

if training_loss_metrics:
if CONTINUE_TRAINING:
with open("validation_loss_history", "rb") as f:
validation_loss_metrics += pickle.load(f)

with open("training_loss_history", "rb") as f:
training_loss_metrics += pickle.load(f)

with open("validation_accuracy_history", "rb") as f:
validation_accuracy_history += pickle.load(f)

with open("training_accuracy_history", "rb") as f:
training_accuracy_history += pickle.load(f)

with open('training_loss_history', 'wb') as f:
pickle.dump(training_loss_metrics, f)

Expand Down

0 comments on commit 65e8696

Please sign in to comment.