From 12c9fb9ee83fccb0bef9de4b34de5afe2967d4f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stardust=C2=B7=E5=87=8F?= <2225664821@qq.com> Date: Mon, 21 Aug 2023 17:17:40 +0800 Subject: [PATCH] Update train_ms.py --- train_ms.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/train_ms.py b/train_ms.py index ad9ac9b..35717c0 100644 --- a/train_ms.py +++ b/train_ms.py @@ -133,13 +133,13 @@ def run(rank, n_gpus, hps): if pretrain_dir is None: try: _, _, _, epoch_str = utils.load_checkpoint(utils.latest_checkpoint_path(hps.model_dir, "G_*.pth"), net_g, - optim_g, skip_optimizer) + optim_g, skip_optimizer=True) _, _, _, epoch_str = utils.load_checkpoint(utils.latest_checkpoint_path(hps.model_dir, "D_*.pth"), net_d, - optim_d, skip_optimizer) + optim_d, skip_optimizer=True) epoch_str = max(epoch_str, 1) global_step = (epoch_str - 1) * len(train_loader) - except Exception: - print("load old checkpoint failed...") + except Exception as e: + print(e) epoch_str = 1 global_step = 0 else: