change naming logic of saving trained file for synthesizer to allow shorter interval

This commit is contained in:
babysor00 2022-01-15 17:56:14 +08:00
parent b56ec5ee1b
commit 8ad9ba2b60

View File

@ -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 :