57112455fc0288a68fc01a79ccd747caf5e5a696,onmt/Models.py,Decoder,forward,#Decoder#Any#Any#Any#Any#,99

Before Change


        batch_size = input.size(0)

        h_size = (batch_size, self.hidden_size)
        output = Variable(emb.data.new(*h_size).zero_(), requires_grad=False)

        // n.b. you can increase performance if you compute W_ih * x for all
        // iterations in parallel, but that"s only possible if
        // self.input_feed=False

After Change



            output, hidden = self.rnn(emb_t, hidden)
            output, attn = self.attn(output.squeeze(0), context.t())
            output = self.dropout(output.unsqueeze(0))
            outputs += [output]

        outputs = torch.cat(outputs, 0)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: OpenNMT/OpenNMT-py
Commit Name: 57112455fc0288a68fc01a79ccd747caf5e5a696
Time: 2017-03-14
Author: bryan.mccann.is@gmail.com
File Name: onmt/Models.py
Class Name: Decoder
Method Name: forward


Project Name: KaiyangZhou/deep-person-reid
Commit Name: cd80a074396caa42b81068115c9b066f4ce08414
Time: 2018-04-26
Author: k.zhou@qmul.ac.uk
File Name: losses.py
Class Name: TripletLoss
Method Name: forward


Project Name: pytorch/examples
Commit Name: bf82a7b48e620dfbee14d55afec26e0810a32199
Time: 2017-03-14
Author: bryan.mccann.is@gmail.com
File Name: OpenNMT/onmt/Models.py
Class Name: Decoder
Method Name: forward