548c67bbe7598c3221b83cf6ef216b848debac2c,parlai/agents/seq2seq/modules.py,OutputLayer,forward,#OutputLayer#Any#,539

Before Change


            scores = self.e2s(e)

        if self.padding_idx == 0:
            pad_score = scores.new(scores.size(0),
                                   scores.size(1),
                                   1).fill_(-NEAR_INF)
            scores = torch.cat([pad_score, scores], dim=-1)

After Change


            // hsz => esz, good time for dropout
            e = self.dropout(self.o2e(input))
            // esz => num_features
            scores = F.linear(e, self.weight, self.bias)

        if self.padding_idx >= 0:
            scores[:, :, self.padding_idx] = -NEAR_INF
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: facebookresearch/ParlAI
Commit Name: 548c67bbe7598c3221b83cf6ef216b848debac2c
Time: 2018-11-15
Author: roller@fb.com
File Name: parlai/agents/seq2seq/modules.py
Class Name: OutputLayer
Method Name: forward


Project Name: NVIDIA/sentiment-discovery
Commit Name: ef87f1a071c6b8ca5607874a1a7d77d8a1ab2821
Time: 2018-11-19
Author: raulp@nvidia.com
File Name: model/sentiment_classifier.py
Class Name: SentimentClassifier
Method Name: forward


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: Embeddings
Method Name: forward