From 7abb76d55205440135028bb46a3b2e93345b8f0b Mon Sep 17 00:00:00 2001 From: Tegar Bangun Suganda <58646818+TEGRAXD@users.noreply.github.com> Date: Tue, 30 Jul 2024 10:00:44 +0700 Subject: [PATCH] Changing 2333333 to latest Removing hard-coded "2333333" in latest saved checkpoint model. This make the code more logical and informative. --- infer/modules/train/train.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/infer/modules/train/train.py b/infer/modules/train/train.py index 38a5678..fdb818e 100644 --- a/infer/modules/train/train.py +++ b/infer/modules/train/train.py @@ -583,14 +583,14 @@ def train_and_evaluate( optim_g, hps.train.learning_rate, epoch, - os.path.join(hps.model_dir, "G_{}.pth".format(2333333)), + os.path.join(hps.model_dir, "G_latest.pth"), ) utils.save_checkpoint( net_d, optim_d, hps.train.learning_rate, epoch, - os.path.join(hps.model_dir, "D_{}.pth".format(2333333)), + os.path.join(hps.model_dir, "D_latest.pth"), ) if rank == 0 and hps.save_every_weights == "1": if hasattr(net_g, "module"): @@ -632,7 +632,7 @@ def train_and_evaluate( ) ) sleep(1) - os._exit(2333333) + os._exit(0) if __name__ == "__main__":