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

Before Change


                           bidirectional=opt.brnn)


        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


        self.word_vec_size = opt.word_vec_size
        
        if self.positional_encoding:
            self.pe = make_positional_encodings(opt.word_vec_size, 5000).cuda()
        if self.encoder_layer == "transformer":
            self.transformer = nn.ModuleList([TransformerEncoder(self.hidden_size, opt)
                                               for _ in range(opt.layers)])
        
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

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: dpressel/mead-baseline
Commit Name: c2684e5cf3719d15ca5a13c1919642f96b55f177
Time: 2018-06-10
Author: dpressel@gmail.com
File Name: python/baseline/pytorch/classify/model.py
Class Name: WordClassifierBase
Method Name: make_input


Project Name: leftthomas/SRGAN
Commit Name: eab5e7909d647e363002b529e9d39911f4a2b028
Time: 2017-12-01
Author: leftthomas@qq.com
File Name: train2.py
Class Name:
Method Name: train


Project Name: ixaxaar/pytorch-dnc
Commit Name: e4eb9a53e63cc626811fa25ae489b06268d0bc0d
Time: 2017-12-09
Author: root@ixaxaar.in
File Name: dnc/dnc.py
Class Name: DNC
Method Name: _init_hidden