Skip to content
This repository has been archived by the owner on Sep 11, 2022. It is now read-only.

Commit

Permalink
Merge pull request #186 from yt605155624/fix_transformertts
Browse files Browse the repository at this point in the history
fix conf copy
  • Loading branch information
yt605155624 authored Sep 28, 2021
2 parents 0613c7f + 9778602 commit 78648cc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions examples/transformer_tts/ljspeech/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ def train_sp(args, config):
output_dir = Path(args.output_dir)
output_dir.mkdir(parents=True, exist_ok=True)

config_name = args.config.split("/")[-1]
# copy conf to output_dir
shutil.copyfile(args.config, output_dir / config_name)

updater = TransformerTTSUpdater(
model=model,
optimizer=optimizer,
Expand Down Expand Up @@ -199,11 +203,9 @@ def main():
if args.device == "cpu" and args.nprocs > 1:
raise RuntimeError("Multiprocess training on CPU is not supported.")
config = get_cfg_default()
config_name = args.config.split("/")[-1]

if args.config:
config.merge_from_file(args.config)
# copy conf to output_dir
shutil.copyfile(args.config, Path(args.output_dir) / config_name)

print("========Args========")
print(yaml.safe_dump(vars(args)))
Expand Down

0 comments on commit 78648cc

Please sign in to comment.