70a188776f7470c838dd22b1636462b75573a734,src/gluonnlp/models/bert.py,BertTransformer,__init__,#BertTransformer#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,110

Before Change


                                              weight_initializer=weight_initializer,
                                              bias_initializer=bias_initializer,
                                              activation=activation,
                                              prefix="{}_".format(layer_idx)))

    def hybrid_forward(self, F, data, valid_length):
        

After Change


        self.embed_layer_norm = nn.LayerNorm(epsilon=self.layer_norm_eps)
        self.embed_dropout = nn.Dropout(hidden_dropout_prob)
        // Construct token type embedding
        self.token_type_embed = nn.Embedding(input_dim=num_token_types,
                                             output_dim=units,
                                             weight_initializer=weight_initializer)
        self.token_pos_embed = PositionalEmbedding(units=units,
                                                   max_length=max_length,
                                                   dtype=self._dtype,
                                                   method=pos_embed_type)
        if self.use_pooler:
            // Construct pooler
            self.pooler = nn.Dense(units=units,
                                   in_units=units,
                                   flatten=False,
                                   activation="tanh",
                                   weight_initializer=weight_initializer,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 7

Non-data size: 3

Instances


Project Name: dmlc/gluon-nlp
Commit Name: 70a188776f7470c838dd22b1636462b75573a734
Time: 2020-07-16
Author: lausen@amazon.com
File Name: src/gluonnlp/models/bert.py
Class Name: BertTransformer
Method Name: __init__


Project Name: dmlc/gluon-nlp
Commit Name: 70a188776f7470c838dd22b1636462b75573a734
Time: 2020-07-16
Author: lausen@amazon.com
File Name: src/gluonnlp/models/roberta.py
Class Name: RobertaEncoder
Method Name: __init__


Project Name: Microsoft/MMdnn
Commit Name: b3bc509ad60a7ce5befbb50275a350d5959ea520
Time: 2018-10-25
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/pytorch/pytorch_emitter.py
Class Name: PytorchEmitter
Method Name: emit_Embedding


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 34577913e8d62f0db23231f4882263b6825fa271
Time: 2017-08-28
Author: jonwayne@google.com
File Name: pubsub/cloud-client/iam.py
Class Name:
Method Name: set_subscription_policy


Project Name: fizyr/keras-retinanet
Commit Name: 93618be71a23f12157497f7716e3e32a385e6680
Time: 2018-02-12
Author: mxvs112@gmail.com
File Name: keras_retinanet/callbacks/eval.py
Class Name: Evaluate
Method Name: on_epoch_end


Project Name: facebookresearch/ParlAI
Commit Name: 9ad1d2da68aa4acf817562502340bf319276b283
Time: 2019-05-14
Author: jju@fb.com
File Name: parlai/mturk/core/dev/socket_manager.py
Class Name: SocketManager
Method Name: open_channel


Project Name: VOLTTRON/volttron
Commit Name: eecd204f1a5ba4de9752991e0fcbc86506309f1e
Time: 2019-12-09
Author: craig.allwardt@pnnl.gov
File Name: volttron/platform/agent/web.py
Class Name: Response
Method Name: add_header