c88688032b3173bb140677e0e4e7b481efd3a5b9,onmt/Models.py,Encoder,forward,#Encoder#Any#Any#Any#,126

Before Change



        if self.encoder_layer == "mean":
            // No RNN, just take mean as final state.
            mean = emb.mean(0).unsqueeze(0) \
                   .expand(self.layers, n_batch, vec_size)
            return (mean, mean), emb

After Change


        
        // CHECKS
        s_len, n_batch, n_feats = input.size()
        if lengths is not None:
            n_batch_ = lengths.size()
            aeq(n_batch, n_batch_)
        // END CHECKS


        
        emb = self.embeddings(input)
        s_len, n_batch, vec_size = emb.size()

        if self.encoder_layer == "mean":
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: OpenNMT/OpenNMT-py
Commit Name: c88688032b3173bb140677e0e4e7b481efd3a5b9
Time: 2017-07-05
Author: srush@sum1gpu01.rc.fas.harvard.edu
File Name: onmt/Models.py
Class Name: Encoder
Method Name: forward


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


Project Name: OpenNMT/OpenNMT-py
Commit Name: bc0ac45c0bf4f66d56df6c54f5230c6c4281daf1
Time: 2017-05-31
Author: srush@sum1gpu02.rc.fas.harvard.edu
File Name: onmt/Translator.py
Class Name: Translator
Method Name: translateBatch