upload files

This commit is contained in:
Plachta
2023-02-15 00:12:18 +08:00
parent 7dd4ce16c6
commit 823158e47b
3 changed files with 5 additions and 3 deletions
+2 -2
View File
@@ -243,14 +243,14 @@ def train_and_evaluate(rank, epoch, hps, nets, optims, schedulers, scaler, loade
utils.save_checkpoint(net_g, None, hps.train.learning_rate, epoch,
os.path.join(hps.model_dir, "G_latest.pth".format(global_step)))
# utils.save_checkpoint(net_d, optim_d, hps.train.learning_rate, epoch, os.path.join(hps.model_dir, "D_{}.pth".format(global_step)))
old_g=os.path.join(hps.model_dir, "G_{}.pth".format(global_step-400))
old_g=os.path.join(hps.model_dir, "G_{}.pth".format(global_step-4000))
# old_d=os.path.join(hps.model_dir, "D_{}.pth".format(global_step-400))
if os.path.exists(old_g):
os.remove(old_g)
# if os.path.exists(old_d):
# os.remove(old_d)
global_step += 1
if global_step == 4001:
if global_step == hps.n_steps + 1:
exit()
if rank == 0: