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
// // (batch_size, H, W, 512)
all_outputs = []
for row in range(input.size(2)):
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)
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: 68fbfd1876c367323acf830736bae1af499cc0fe
Time: 2018-03-07
Author: dengyuntian@gmail.com
File Name: onmt/modules/Transformer.py
Class Name: TransformerDecoder
Method Name: forward