4fed0beca64a52aa718371dc3b2cf1fd979197a4,fairseq/models/wav2vec/wav2vec2.py,Wav2Vec2Model,forward,#Wav2Vec2Model#Any#Any#Any#Any#,446

Before Change


            extra = padding_mask.size(1) % features.size(1)
            if extra > 0:
                padding_mask = padding_mask[:, :-extra]
            padding_mask = padding_mask.view(padding_mask.size(0), features.size(1), -1)
            padding_mask = padding_mask.all(-1)

        if self.post_extract_proj is not None:

After Change



            // these two operations makes sure that all values
            // before the output lengths indices are attended to
            padding_mask[(torch.arange(padding_mask.shape[0], device=padding_mask.device), output_lengths - 1)] = 1
            padding_mask = (1 - padding_mask.flip([-1]).cumsum(-1).flip([-1])).bool()

        if self.post_extract_proj is not None:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: pytorch/fairseq
Commit Name: 4fed0beca64a52aa718371dc3b2cf1fd979197a4
Time: 2021-02-10
Author: patrick.v.platen@gmail.com
File Name: fairseq/models/wav2vec/wav2vec2.py
Class Name: Wav2Vec2Model
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: rusty1s/pytorch_geometric
Commit Name: 1a8ca5d5d6ca5cb0e3494cd5c9e77759909ec955
Time: 2017-11-27
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/nn/functional/max_pool_voxel/max_pool_voxel.py
Class Name: MaxPoolVoxel
Method Name: backward