bd570b58cefa57062f8c14e06b83800c52f4925a,sru/sru_functional.py,SRU,forward,#SRU#Any#Any#Any#Any#,545
Before Change
if return_hidden:
print("lstc[0].size()", lstc[0].size())
lstc_stack = torch.stack(lstc)
if self.nn_rnn_compatible_return:
print("lstc_stack.size()", lstc_stack.size())
return prevx, lstc_stack
else:
return prevx
After Change
if return_hidden:
lstc_stack = torch.stack(lstc)
if self.nn_rnn_compatible_return:
batch_size = input.size(1)
lstc_stack = lstc_stack.view(self.num_layers, batch_size, self.num_directions, self.n_out)
lstc_stack = lstc_stack.transpose(1, 2)
lstc_stack = lstc_stack.contiguous().view(self.num_layers * self.num_directions, batch_size, self.n_out)
return prevx, lstc_stack
else:
return prevx
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: asappresearch/sru
Commit Name: bd570b58cefa57062f8c14e06b83800c52f4925a
Time: 2019-09-18
Author: hp@asapp.com
File Name: sru/sru_functional.py
Class Name: SRU
Method Name: forward
Project Name: OpenNMT/OpenNMT-py
Commit Name: 625451ab74f1942eb951337554d72005076a51b3
Time: 2017-12-12
Author: dengyuntian@gmail.com
File Name: onmt/Translator.py
Class Name: Translator
Method Name: translateBatch
Project Name: maciejkula/spotlight
Commit Name: bc51dbc0c56f68ed30857755026633f78eef1ae8
Time: 2017-08-20
Author: maciej.kula@gmail.com
File Name: spotlight/layers.py
Class Name: BloomEmbedding
Method Name: forward