3bc7e38ed98f3b7a13fcee2726ec38b27e5c4e1b,onmt/Models.py,Encoder,__init__,#Encoder#Any#Any#Any#,36

Before Change




        self.multiattn = nn.ModuleList([onmt.modules.MultiHeadedAttention(8, self.hidden_size) for _ in range(self.layers)])
        self.linear_out = nn.ModuleList([BLinear(self.hidden_size, 2*self.hidden_size) for _ in range(self.layers)])
        self.linear_final = nn.ModuleList([BLinear(2*self.hidden_size, self.hidden_size) for _ in range(self.layers)])

        self.layer_norm = nn.ModuleList([BLayerNorm(self.hidden_size) for _ in range(self.layers)])

After Change




        super(Encoder, self).__init__()
        self.dropout = nn.Dropout(p=opt.dropout)
        
        // Word embeddings.
        self.word_lut = nn.Embedding(dicts.size(),
                                     opt.word_vec_size,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: OpenNMT/OpenNMT-py
Commit Name: 3bc7e38ed98f3b7a13fcee2726ec38b27e5c4e1b
Time: 2017-06-23
Author: srush@sum1gpu02.rc.fas.harvard.edu
File Name: onmt/Models.py
Class Name: Encoder
Method Name: __init__


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: keras-team/keras
Commit Name: 6899a9db16e04505b8a17770e7fb068a3c586347
Time: 2015-07-14
Author: francois.chollet@gmail.com
File Name: examples/imdb_conv.py
Class Name:
Method Name: