Skip to content

Commit

Permalink
Update train_ms.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiefy authored Sep 18, 2022
1 parent e008cd5 commit 3567c16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions train_ms.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ def train_and_evaluate(rank, epoch, hps, nets, optims, schedulers, scaler, loade

if global_step % hps.train.eval_interval == 0:
evaluate(hps, net_g, eval_loader, writer_eval)
utils.save_checkpoint(net_g, optim_g, hps.train.learning_rate, epoch, os.path.join(hps.model_dir, "G_{}.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)))
utils.save_checkpoint(net_g, optim_g, hps.train.learning_rate, epoch, '/content/drive/MyDrive/G_genshin.pth')
utils.save_checkpoint(net_d, optim_d, hps.train.learning_rate, epoch, '/content/drive/MyDrive/D_genshin.pth')
global_step += 1

if rank == 0:
Expand Down

0 comments on commit 3567c16

Please sign in to comment.