13bbee615c87c812ddcfff73746cd504222e3fb0,onmt/Models.py,,make_base_model,#Any#Any#Any#Any#Any#,561

Before Change


    // HACK: collect source feature vocabs.
    feature_vocabs = []
    for j in range(100):
        key = "src_feat_" + str(j)
        if key not in fields:
            break
        feature_vocabs.append(fields[key].vocab)

After Change



    // Make Encoder.
    src_vocab = fields["src"].vocab
    num_feat_embeddings = [len(feat_dict) for feat_dict in
                           ONMTDataset.collect_feature_dicts(fields)]
    embeddings = build_embeddings(
                model_opt, src_vocab.stoi[onmt.IO.PAD_WORD],
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: OpenNMT/OpenNMT-py
Commit Name: 13bbee615c87c812ddcfff73746cd504222e3fb0
Time: 2017-08-30
Author: nasa4836@gmail.com
File Name: onmt/Models.py
Class Name:
Method Name: make_base_model


Project Name: deepmind/sonnet
Commit Name: 2a3a5d3cef42e5bf997cfb9dac87163ccaa3c8f1
Time: 2019-09-16
Author: tomhennigan@google.com
File Name: sonnet/src/utils.py
Class Name:
Method Name: format_variables


Project Name: OpenNMT/OpenNMT-py
Commit Name: edb5973471098d93709a9f8bf943788ca548c113
Time: 2017-09-19
Author: nasa4836@gmail.com
File Name: train.py
Class Name:
Method Name: main