Jack-Cherish / dsi

Do Something Interesting缩写,做一些有趣的事

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

继续训练的逻辑问题

chuanleiD opened this issue · comments

在前端界面。您声称:“重新训练选择是,接着已经保存的模型继续训练选择否”

然而,当选择“是”时:
continue_train=“是”

这导致get_hparams()函数中,cont = True
if continue_train == "是":
drop_speaker_embed = False
cont = True

在run()函数中的,hps.cont == True,会导致加载G_latest.pth、D_latest.pth。
if hps.cont:
try:
_, _, _, epoch_str = utils.load_checkpoint(utils.latest_checkpoint_path(hps.model_dir, "G_latest.pth"), net_g, None)
_, _, _, epoch_str = utils.load_checkpoint(utils.latest_checkpoint_path(hps.model_dir, "D_latest.pth"), net_d, None)
global_step = (epoch_str - 1) * len(train_loader)

因此,我认为当选择“是”时,继续训练,而选择”否“,重新训练。