Skip to content

Commit

Permalink
change naming logic of saving trained file for synthesizer to allow s…
Browse files Browse the repository at this point in the history
…horter interval
  • Loading branch information
babysor committed Jan 15, 2022
1 parent b56ec5e commit 8ad9ba2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion synthesizer/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 :
Expand Down

0 comments on commit 8ad9ba2

Please sign in to comment.