4fed0beca64a52aa718371dc3b2cf1fd979197a4,fairseq/models/wav2vec/wav2vec2.py,Wav2Vec2Model,forward,#Wav2Vec2Model#Any#Any#Any#Any#,446
Before Change
unmasked_features = features.clone()
if padding_mask is not None:
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)
After Change
unmasked_features = features.clone()
if padding_mask is not None:
input_lengths = (1 - padding_mask.long()).sum(-1)
// apply conv formula to get real output_lengths
output_lengths = self._get_feat_extract_output_lengths(input_lengths)
padding_mask = torch.zeros(
features.shape[:2], dtype=features.dtype, device=features.device
)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
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: pcyin/tranX
Commit Name: 65c51a90b9034c934e4f91d6fe35d6a28c3b2f7e
Time: 2018-10-28
Author: pcyin@cs.cmu.edu
File Name: model/seq2seq.py
Class Name: Seq2SeqModel
Method Name: score_decoding_results
Project Name: osmr/imgclsmob
Commit Name: c1ac4b582134b8bc0dac6688762ece201f88ab63
Time: 2019-05-12
Author: osemery@gmail.com
File Name: chainer_/cls_metrics.py
Class Name: TopKAccuracy
Method Name: update
Project Name: cornellius-gp/gpytorch
Commit Name: 71c4ebaf3ecffd66f43a575a010808dae4266b8c
Time: 2017-12-22
Author: gpleiss@gmail.com
File Name: gpytorch/gp_model.py
Class Name: GPModel
Method Name: marginal_log_likelihood