Skip to content

Commit

Permalink
Update train_ms.py (#46)
Browse files Browse the repository at this point in the history
Fix error when resuming training
  • Loading branch information
OedoSoldier authored Oct 2, 2023
1 parent 0ea7530 commit 85a467c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions train_ms.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ def run():
optim_g.param_groups[0]["initial_lr"] = g_resume_lr
if not optim_d.param_groups[0].get("initial_lr"):
optim_d.param_groups[0]["initial_lr"] = d_resume_lr
if not optim_dur_disc.param_groups[0].get("initial_lr"):
optim_dur_disc.param_groups[0]["initial_lr"] = dur_resume_lr

epoch_str = max(epoch_str, 1)
global_step = (epoch_str - 1) * len(train_loader)
Expand Down

0 comments on commit 85a467c

Please sign in to comment.