3bc7e38ed98f3b7a13fcee2726ec38b27e5c4e1b,onmt/Models.py,Encoder,forward,#Encoder#Any#Any#Any#,123

Before Change


                // feed forward
                ff_in, _ = self.multiattn[i](out, out, out)
                // ff_in = out
                ff_out = self.linear_final[i](F.relu(self.linear_out[i](ff_in)))
                out = self.layer_norm[i](ff_in + F.dropout(ff_out, p=0.1))
                // out = self.layer_norm[i](F.relu(ff_in + ff_out)).contiguous()
            return (mean, mean), out.transpose(0, 1).contiguous()
        if lengths:

After Change


                   .expand(self.layers, pre_emb.size(1), pre_emb.size(2))
            out = pre_emb.transpose(0, 1).contiguous()
            for i in range(self.layers):
                out = self.transformer[i](out, input[:, :, 0])
            return (mean, mean), out.transpose(0, 1).contiguous()
            
    
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: forward


Project Name: Cadene/pretrained-models.pytorch
Commit Name: b2074ddf9d8bc2069d66976fea58a52f40238496
Time: 2017-11-16
Author: remi.cadene@icloud.com
File Name: pretrainedmodels/nasnet.py
Class Name: CellStem1
Method Name: forward


Project Name: osmr/imgclsmob
Commit Name: 810dfd93e2681625e932dc7c7f4c59352bab4bd3
Time: 2019-03-06
Author: osemery@gmail.com
File Name: pytorch/pytorchcv/models/others/oth_irevnet2.py
Class Name: iRevNet
Method Name: forward