bda270d6255bca6c9518f4f6e8d2cdee8cd6a40c,parlai/agents/seq2seq/modules.py,Encoder,forward,#Encoder#Any#,294

Before Change


        // embed input tokens
        xes = self.dropout(self.lt(xs))
        try:
            x_lens = [x for x in torch.sum((xs > 0).int(), dim=1).data]
            xes = pack_padded_sequence(xes, x_lens, batch_first=True)
            packed = True
        except ValueError:
            // packing failed, don"t pack then

After Change



        // embed input tokens
        xes = self.dropout(self.lt(xs))
        attn_mask = xs.ne(0)
        try:
            x_lens = torch.sum(attn_mask.int(), dim=1)
            xes = pack_padded_sequence(xes, x_lens, batch_first=True)
            packed = True
        except ValueError:
            // packing failed, don"t pack then
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: facebookresearch/ParlAI
Commit Name: bda270d6255bca6c9518f4f6e8d2cdee8cd6a40c
Time: 2018-08-29
Author: ahm@fb.com
File Name: parlai/agents/seq2seq/modules.py
Class Name: Encoder
Method Name: forward


Project Name: snipsco/snips-nlu
Commit Name: 7e3032b51b197e833915bc353e9e063205c0d4f9
Time: 2017-04-07
Author: adrien.ball@snips.net
File Name: snips_nlu/intent_classifier/data_augmentation.py
Class Name:
Method Name: get_regularization_factor


Project Name: scikit-image/scikit-image
Commit Name: 02c704530eab9c8376b029aab4047babda5c65b8
Time: 2017-10-29
Author: contact@kne42.me
File Name: skimage/measure/_moments.py
Class Name:
Method Name: moments_contour_central