26421ce20c6b626ceacafbb3282cad1d5dce04ca,onmt/Models.py,Embeddings,forward,#Embeddings#Any#,60

Before Change


        Return:
            emb (FloatTensor): len x batch x input_size
        
        word = self.word_lut(src_input[:, :, 0])
        emb = word
        if self.feature_dicts:
            features = [feature_lut(src_input[:, :, j+1])

After Change


        Return:
            emb (FloatTensor): len x batch x sum of feature embedding sizes
        
        feat_inputs = (feat.squeeze(2) for feat in src_input.split(1, dim=2))
        features = [lut(feat) for lut, feat in zip(self.emb_luts, feat_inputs)]
        emb = self.merge(features)
        return emb


class Encoder(nn.Module):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: OpenNMT/OpenNMT-py
Commit Name: 26421ce20c6b626ceacafbb3282cad1d5dce04ca
Time: 2017-07-30
Author: bpeters@coli.uni-saarland.de
File Name: onmt/Models.py
Class Name: Embeddings
Method Name: forward


Project Name: OpenNMT/OpenNMT-py
Commit Name: f6f6ee1df8d619d9816a5296bebca5736fa952bf
Time: 2017-09-21
Author: bpeters@coli.uni-saarland.de
File Name: translate.py
Class Name:
Method Name: main


Project Name: maciejkula/spotlight
Commit Name: 70e4d7fe60a9658bb27b9f5fb67592a1222b2ec3
Time: 2017-07-06
Author: maciej.kula@gmail.com
File Name: spotlight/sequence/representations.py
Class Name: LSTMNet
Method Name: user_representation