08184fbbb9248ebe53350f71f6f43be859fd838e,onmt/Models.py,Decoder,forward,#Decoder#Any#Any#Any#Any#Any#,244

Before Change


            outputs = output.transpose(0, 1).contiguous()

            if False:
                if hidden is not None:
                    outputs = outputs[hidden.size(0):]
                    attn = attn[:, hidden.size(0):].squeeze()
                    attn = torch.stack([attn])

            attns["std"] = attn
            if self._copy:
                attns["copy"] = attn
            hidden = input

After Change


            attns["std"] = attn
            if self._copy:
                attns["copy"] = attn
            hidden = (input.unsqueeze(2),)
        else:
            for i, emb_t in enumerate(emb.split(1)):
                emb_t = emb_t.squeeze(0)
                if self.input_feed:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: OpenNMT/OpenNMT-py
Commit Name: 08184fbbb9248ebe53350f71f6f43be859fd838e
Time: 2017-06-30
Author: sasha.rush@gmail.com
File Name: onmt/Models.py
Class Name: Decoder
Method Name: forward


Project Name: OpenNMT/OpenNMT-py
Commit Name: ba164c0dbb3d8171004380956a88431f4e8248ba
Time: 2017-08-01
Author: bpeters@coli.uni-saarland.de
File Name: onmt/Models.py
Class Name: Embeddings
Method Name: make_positional_encodings


Project Name: OpenNMT/OpenNMT-py
Commit Name: 7dcc162114ac1d3c3846150d5c600f4d8683fa73
Time: 2018-02-16
Author: srush@seas.harvard.edu
File Name: onmt/Models.py
Class Name: RNNDecoderBase
Method Name: forward