7ee5c4cc9f2224f24f8121e78fdc969a2bf754e1,OpenNMT/onmt/Models.py,Decoder,forward,#Decoder#Any#Any#Any#,102

Before Change


        hidden = enc_hidden

        outputs = []
        hidden = (hidden[0].squeeze(0), hidden[1].squeeze(0))
        for emb_t in emb.chunk(emb.size(0)):
            emb_t = emb_t.squeeze(0)
            if self.input_feed:
                emb_t = torch.cat([emb_t, output], 1)

            // FIXME: multilayer
            hidden = self.rnn(emb_t, hidden)
            output = hidden[0]
            output = self.attn(output, context.t())
            output = self.dropout(output)
            outputs += [output]

        outputs = torch.cat([x.unsqueeze(0) for x in outputs])
        return outputs


class NMTModel(nn.Container):

After Change


            output = self.dropout(output)
            outputs += [output]

        outputs = torch.stack(outputs)
        return outputs


class NMTModel(nn.Container):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: OpenNMT/OpenNMT-py
Commit Name: 7ee5c4cc9f2224f24f8121e78fdc969a2bf754e1
Time: 2017-01-11
Author: alerer@fb.com
File Name: OpenNMT/onmt/Models.py
Class Name: Decoder
Method Name: forward


Project Name: OpenNMT/OpenNMT-py
Commit Name: 0e7bfac76b97e7630102687f7e6309e00e190091
Time: 2018-11-13
Author: benzurdopeters@gmail.com
File Name: onmt/decoders/ensemble.py
Class Name: EnsembleGenerator
Method Name: forward


Project Name: aleju/imgaug
Commit Name: 8eed54d678e4869e390e5281404bda0484fcd9ed
Time: 2019-09-18
Author: kontakt@ajung.name
File Name: imgaug/augmenters/geometric.py
Class Name:
Method Name: _warp_affine_arr_cv2