9196c0b6544c916ef9f2178a9a45cc06d264db49,fairseq/models/lstm.py,LSTMDecoder,forward,#LSTMDecoder#Any#Any#Any#,343

Before Change


            num_layers = len(self.layers)
            prev_hiddens = [encoder_hiddens[i] for i in range(num_layers)]
            prev_cells = [encoder_cells[i] for i in range(num_layers)]
            input_feed = x.data.new(bsz, self.encoder_output_units).zero_()

        attn_scores = x.data.new(srclen, seqlen, bsz).zero_()
        outs = []
        for j in range(seqlen):

After Change


            num_layers = len(self.layers)
            prev_hiddens = [encoder_hiddens[i] for i in range(num_layers)]
            prev_cells = [encoder_cells[i] for i in range(num_layers)]
            if self.encoder_hidden_proj is not None:
                prev_hiddens = [self.encoder_hidden_proj(x) for x in prev_hiddens]
                prev_cells = [self.encoder_cell_proj(x) for x in prev_cells]
            input_feed = x.new_zeros(bsz, self.hidden_size)

        attn_scores = x.new_zeros(srclen, seqlen, bsz)
        outs = []
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: pytorch/fairseq
Commit Name: 9196c0b6544c916ef9f2178a9a45cc06d264db49
Time: 2019-01-24
Author: myleott@fb.com
File Name: fairseq/models/lstm.py
Class Name: LSTMDecoder
Method Name: forward


Project Name: cornellius-gp/gpytorch
Commit Name: 6d1a523f4d9d936e495c568f7b9a6a27f4fda950
Time: 2017-11-07
Author: jrg365@cornell.edu
File Name: gpytorch/kernels/spectral_mixture_kernel.py
Class Name: SpectralMixtureKernel
Method Name: forward