ac5cc567a8b9159279cc57f642c9d3891ff6ebe9,seq2seq_models.py,AttnDecoderRNN,forward,#AttnDecoderRNN#,156

Before Change


        // and context vector
        rnn_output = rnn_output.squeeze(0)  // S(=1) x B x I -> B x I
        context = context.squeeze(1)  // B x S(=1) x I -> B x I
        output = F.log_softmax(self.out(torch.cat((rnn_output, context), 1)))

        // Return final output, hidden state, and attention weights (for
        // visualization)

After Change


        // and context vector
        rnn_output = rnn_output.squeeze(0)  // S(=1) x B x I -> B x I
        context = context.squeeze(1)  // B x S(=1) x I -> B x I
        output = self.out(torch.cat((rnn_output, context), 1))

        // Return final output, hidden state, and attention weights (for
        // visualization)
        return output, context, hidden, attn_weights
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: hunkim/PyTorchZeroToAll
Commit Name: ac5cc567a8b9159279cc57f642c9d3891ff6ebe9
Time: 2017-11-01
Author: hunkim@gmail.com
File Name: seq2seq_models.py
Class Name: AttnDecoderRNN
Method Name: forward


Project Name: keon/seq2seq
Commit Name: 55268ace0817879ace07b73e223c3a6db79a3180
Time: 2017-12-06
Author: kwk236@gmail.com
File Name: model.py
Class Name: Decoder
Method Name: forward


Project Name: hunkim/PyTorchZeroToAll
Commit Name: ac5cc567a8b9159279cc57f642c9d3891ff6ebe9
Time: 2017-11-01
Author: hunkim@gmail.com
File Name: seq2seq_models.py
Class Name: DecoderRNN
Method Name: forward