Skip to content

Commit

Permalink
Fixed updattion of metrics
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 65e8696 commit ec8e973
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,16 +176,16 @@ def save_model(sess, training_loss_metrics=None, validation_loss_metrics=None,
if training_loss_metrics:
if CONTINUE_TRAINING:
with open("validation_loss_history", "rb") as f:
validation_loss_metrics += pickle.load(f)
validation_loss_metrics = pickle.load(f) + validation_loss_metrics

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

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

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

with open('training_loss_history', 'wb') as f:
pickle.dump(training_loss_metrics, f)
Expand Down Expand Up @@ -293,7 +293,7 @@ def run():
'--num_epochs',
type=int,
nargs='?',
default=30,
default=50,
help='Number of epochs.'
)
parser.add_argument(
Expand Down

0 comments on commit ec8e973

Please sign in to comment.