From 8ad9ba2b60aef57d6d7c83832f07c4f1173d493b Mon Sep 17 00:00:00 2001 From: babysor00 Date: Sat, 15 Jan 2022 17:56:14 +0800 Subject: [PATCH] change naming logic of saving trained file for synthesizer to allow shorter interval --- synthesizer/train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synthesizer/train.py b/synthesizer/train.py index 7446e80..4ade026 100644 --- a/synthesizer/train.py +++ b/synthesizer/train.py @@ -222,7 +222,7 @@ def train(run_id: str, syn_dir: str, models_dir: str, save_every: int, # Backup or save model as appropriate if backup_every != 0 and step % backup_every == 0 : - backup_fpath = Path("{}/{}_{}k.pt".format(str(weights_fpath.parent), run_id, k)) + backup_fpath = Path("{}/{}_{}.pt".format(str(weights_fpath.parent), run_id, step)) model.save(backup_fpath, optimizer) if save_every != 0 and step % save_every == 0 :