From 0e139940672c0bb9b9a76652e24d854e270de2a7 Mon Sep 17 00:00:00 2001 From: Capuchi-Tan Date: Sun, 8 May 2022 18:58:27 +0700 Subject: [PATCH] moved epoch state increment to before save --- train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/train.py b/train.py index ff03ac9..391d379 100644 --- a/train.py +++ b/train.py @@ -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