From b304564c9ea304fd53a0b282677eddab2120bdea Mon Sep 17 00:00:00 2001 From: RVC-Boss <129054828+RVC-Boss@users.noreply.github.com> Date: Fri, 26 Jan 2024 16:01:14 +0800 Subject: [PATCH] Update train.py --- infer/modules/train/train.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/infer/modules/train/train.py b/infer/modules/train/train.py index ab6ba2d..a9c590f 100644 --- a/infer/modules/train/train.py +++ b/infer/modules/train/train.py @@ -229,13 +229,13 @@ def run( if rank == 0: logger.info("loaded pretrained %s" % (hps.pretrainG)) if hasattr(net_g, "module"): - logger.info( + print( net_g.module.load_state_dict( torch.load(hps.pretrainG, map_location="cpu")["model"] ) ) ##测试不加载优化器 else: - logger.info( + print( net_g.load_state_dict( torch.load(hps.pretrainG, map_location="cpu")["model"] ) @@ -244,13 +244,13 @@ def run( if rank == 0: logger.info("loaded pretrained %s" % (hps.pretrainD)) if hasattr(net_d, "module"): - logger.info( + print( net_d.module.load_state_dict( torch.load(hps.pretrainD, map_location="cpu")["model"] ) ) else: - logger.info( + print( net_d.load_state_dict( torch.load(hps.pretrainD, map_location="cpu")["model"] )