857e36921ab5ca51c919839ec0b6e87585160d0c,onmt/decoders/ensemble.py,,load_test_model,#Any#Any#,119

Before Change


        if shared_fields is None:
            shared_fields = fields
        else:
            for key, field in fields.items():
                if field is not None and "vocab" in field.__dict__:
                    assert field.vocab.stoi == shared_fields[key].vocab.stoi, \
                        "Ensemble models must use the same preprocessed data"
        models.append(model)
        if shared_model_opt is None:
            shared_model_opt = model_opt
    ensemble_model = EnsembleModel(models, opt.avg_raw_probs)

After Change



class EnsembleGenerator(nn.Module):
    
    Dummy Generator that delegates to individual real Generators,
    and then averages the resulting target distributions.
    
    def __init__(self, model_generators, raw_probs=False):
        super(EnsembleGenerator, self).__init__()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: OpenNMT/OpenNMT-py
Commit Name: 857e36921ab5ca51c919839ec0b6e87585160d0c
Time: 2019-02-14
Author: dylan.flaute@gmail.com
File Name: onmt/decoders/ensemble.py
Class Name:
Method Name: load_test_model


Project Name: ClimbsRocks/auto_ml
Commit Name: a23afcd39cc364f17e1adefc1a4309e99c4a3d7d
Time: 2017-05-19
Author: ClimbsBytes@gmail.com
File Name: auto_ml/utils_model_training.py
Class Name: FinalModelATC
Method Name: predict_uncertainty


Project Name: keras-team/keras
Commit Name: c9642571c23004a10e8bca1a5b1446af399f80db
Time: 2016-02-16
Author: francois.chollet@gmail.com
File Name: keras/callbacks.py
Class Name: History
Method Name: on_batch_end