Update train_ms.py

This commit is contained in:
Stardust·减
2023-11-25 17:30:24 +08:00
committed by GitHub
parent 65cf40fa49
commit f65b332f93

View File

@@ -1,5 +1,4 @@
# flake8: noqa: E402
import platform
import os
import torch
@@ -582,7 +581,7 @@ def train_and_evaluate(
epoch,
os.path.join(hps.model_dir, "DUR_{}.pth".format(global_step)),
)
keep_ckpts = getattr(hps.train, "keep_ckpts", 10)
keep_ckpts = config.train_ms_config.keep_ckpts
if keep_ckpts > 0:
utils.clean_checkpoints(
path_to_models=hps.model_dir,