7982a664d710a604a5157c542180a20c87cf4216,onmt/modules/ImageEncoder.py,ImageEncoder,forward,#ImageEncoder#Any#,39

Before Change


        hidden_t = []
        for row in range(input.size(2)):
            print(input[:, :, row, :].size())
            row_outputs, row_hidden_t = self.rnn(input[:, :, row, :], None)
            hidden_t.append(row_hidden_t)
        return hidden_t

After Change


            inp = input[:, :, row, :].transpose(0, 2).transpose(1, 2)
            outputs, hidden_t = self.rnn(inp)
            all_outputs.append(outputs)
        out = torch.cat(all_outputs, 0)
        
        return hidden_t, out
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: OpenNMT/OpenNMT-py
Commit Name: 7982a664d710a604a5157c542180a20c87cf4216
Time: 2017-06-02
Author: srush@seas.harvard.edu
File Name: onmt/modules/ImageEncoder.py
Class Name: ImageEncoder
Method Name: forward


Project Name: OpenNMT/OpenNMT-py
Commit Name: 7bb2fb11ad088d9aa27c9adf344f3ddd1324ced7
Time: 2017-05-31
Author: srush@seas.harvard.edu
File Name: onmt/modules/ImageEncoder.py
Class Name: ImageEncoder
Method Name: forward


Project Name: OpenNMT/OpenNMT-py
Commit Name: 5e8936c90646daea4a0483f3fc73f6e0aa4b1c9e
Time: 2017-09-20
Author: jingxil@foxmail.com
File Name: onmt/modules/SRU.py
Class Name: SRU
Method Name: forward