mirror of
https://github.com/babysor/MockingBird.git
synced 2024-03-22 13:11:31 +08:00
change naming logic of saving trained file for synthesizer to allow shorter interval
This commit is contained in:
parent
b56ec5ee1b
commit
8ad9ba2b60
@ -222,7 +222,7 @@ def train(run_id: str, syn_dir: str, models_dir: str, save_every: int,
|
|||||||
|
|
||||||
# Backup or save model as appropriate
|
# Backup or save model as appropriate
|
||||||
if backup_every != 0 and step % backup_every == 0 :
|
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)
|
model.save(backup_fpath, optimizer)
|
||||||
|
|
||||||
if save_every != 0 and step % save_every == 0 :
|
if save_every != 0 and step % save_every == 0 :
|
||||||
|
Loading…
x
Reference in New Issue
Block a user