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)])

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: 3

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: 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


Project Name: open-mmlab/mmdetection
Commit Name: 2bd4c84340a3c35b011026657a9ed30e380d0d75
Time: 2019-05-10
Author: chenkaidev@gmail.com
File Name: tools/test.py
Class Name:
Method Name: main