70a188776f7470c838dd22b1636462b75573a734,tests/test_models_electra.py,,test_bert_get_pretrained,#Any#,13

Before Change


        gen_cfg = get_generator_cfg(cfg)
        word_embed_params = electra_disc_model.backbone_model.word_embed.collect_params()
        token_type_embed_params = electra_disc_model.backbone_model.token_pos_embed.collect_params()
        token_pos_embed_params = electra_disc_model.backbone_model.token_pos_embed.collect_params()
        embed_layer_norm_params = electra_disc_model.backbone_model.embed_layer_norm.collect_params()
        electra_gen_model = ElectraGenerator(gen_cfg,
                            tied_embeddings=True,
                            word_embed_params=word_embed_params,

After Change


        electra_gen_model.tie_embeddings(
            electra_disc_model.backbone_model.word_embed.collect_params(),
            electra_disc_model.backbone_model.token_type_embed.collect_params(),
            electra_disc_model.backbone_model.token_pos_embed.collect_params(),
            electra_disc_model.backbone_model.embed_layer_norm.collect_params())

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: dmlc/gluon-nlp
Commit Name: 70a188776f7470c838dd22b1636462b75573a734
Time: 2020-07-16
Author: lausen@amazon.com
File Name: tests/test_models_electra.py
Class Name:
Method Name: test_bert_get_pretrained


Project Name: dmlc/gluon-nlp
Commit Name: 70a188776f7470c838dd22b1636462b75573a734
Time: 2020-07-16
Author: lausen@amazon.com
File Name: tests/test_layers.py
Class Name:
Method Name: test_projected_adaptive_softmax


Project Name: apache/incubator-mxnet
Commit Name: e2366e9102e6862416bf998af52baaa5e9c0a31b
Time: 2020-07-15
Author: lausen@amazon.com
File Name: python/mxnet/gluon/block.py
Class Name: HybridBlock
Method Name: _build_cache