Skip to content

Commit

Permalink
Merge pull request #13 from B-lanc/bug-train_state
Browse files Browse the repository at this point in the history
moved epoch state increment to before save
  • Loading branch information
f90 authored May 8, 2022
2 parents 443fe30 + 0e13994 commit 86c113d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ def main(args):
state["best_loss"] = val_loss
state["best_checkpoint"] = checkpoint_path

state["epochs"] += 1
# CHECKPOINT
print("Saving model...")
model_utils.save_model(model, optimizer, state, checkpoint_path)

state["epochs"] += 1

#### TESTING ####
# Test loss
Expand Down

0 comments on commit 86c113d

Please sign in to comment.