0121b66402266d38319fd24d590134af0f06f66f,train.py,,,#,838

Before Change


    assert hparams.name == "deepvoice3"

    // Presets
    if hparams.preset is not None and hparams.preset != "":
        preset = hparams.presets[hparams.preset]
        import json
        hparams.parse_json(json.dumps(preset))
        print("Override hyper parameters with preset \"{}\": {}".format(
            hparams.preset, json.dumps(preset, indent=4)))

    _frontend = getattr(frontend, hparams.frontend)

    os.makedirs(checkpoint_dir, exist_ok=True)

After Change


    checkpoint_restore_parts = args["--restore-parts"]
    speaker_id = args["--speaker-id"]
    speaker_id = int(speaker_id) if speaker_id is not None else None
    preset = args["--preset"]

    data_root = args["--data-root"]
    if data_root is None:
        data_root = join(dirname(__file__), "data", "ljspeech")

    log_event_path = args["--log-event-path"]
    reset_optimizer = args["--reset-optimizer"]

    // Which model to be trained
    train_seq2seq = args["--train-seq2seq-only"]
    train_postnet = args["--train-postnet-only"]
    // train both if not specified
    if not train_seq2seq and not train_postnet:
        print("Training whole model")
        train_seq2seq, train_postnet = True, True
    if train_seq2seq:
        print("Training seq2seq model")
    elif train_postnet:
        print("Training postnet model")
    else:
        assert False, "must be specified wrong args"

    // Load preset if specified
    if preset is not None:
        with open(preset) as f:
            hparams.parse_json(f.read())
    // Override hyper parameters
    hparams.parse(args["--hparams"])
    assert hparams.name == "deepvoice3"
    print(hparams_debug_string())
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 37

Instances


Project Name: r9y9/deepvoice3_pytorch
Commit Name: 0121b66402266d38319fd24d590134af0f06f66f
Time: 2018-03-03
Author: zryuichi@gmail.com
File Name: train.py
Class Name:
Method Name:


Project Name: r9y9/deepvoice3_pytorch
Commit Name: 0121b66402266d38319fd24d590134af0f06f66f
Time: 2018-03-03
Author: zryuichi@gmail.com
File Name: train.py
Class Name:
Method Name:


Project Name: r9y9/wavenet_vocoder
Commit Name: 5c311185f2ce5f15e7ad87e6ecb641e5f3ccc5b4
Time: 2018-03-04
Author: zryuichi@gmail.com
File Name: train.py
Class Name:
Method Name:


Project Name: r9y9/deepvoice3_pytorch
Commit Name: 0121b66402266d38319fd24d590134af0f06f66f
Time: 2018-03-03
Author: zryuichi@gmail.com
File Name: synthesis.py
Class Name:
Method Name:


Project Name: r9y9/wavenet_vocoder
Commit Name: 5c311185f2ce5f15e7ad87e6ecb641e5f3ccc5b4
Time: 2018-03-04
Author: zryuichi@gmail.com
File Name: synthesis.py
Class Name:
Method Name: