diff --git a/egs/librispeech/ASR/pruned_transducer_stateless_d2v_v2/.data2vec_audio.py.swp b/egs/librispeech/ASR/pruned_transducer_stateless_d2v_v2/.data2vec_audio.py.swp index 3afcbcb3d..10f140871 100644 Binary files a/egs/librispeech/ASR/pruned_transducer_stateless_d2v_v2/.data2vec_audio.py.swp and b/egs/librispeech/ASR/pruned_transducer_stateless_d2v_v2/.data2vec_audio.py.swp differ diff --git a/egs/librispeech/ASR/pruned_transducer_stateless_d2v_v2/data2vec_audio.py b/egs/librispeech/ASR/pruned_transducer_stateless_d2v_v2/data2vec_audio.py index a6e92adec..b7b015142 100644 --- a/egs/librispeech/ASR/pruned_transducer_stateless_d2v_v2/data2vec_audio.py +++ b/egs/librispeech/ASR/pruned_transducer_stateless_d2v_v2/data2vec_audio.py @@ -490,14 +490,15 @@ class Data2VecAudioModel(BaseFairseqModel): ## for prompt tuning if prompt is not None: - print(features.size()) conv_feat_all = torch.tensor([]).to(features.device) + length = 0 for i in range(padding_mask.size()[0]): nonzero = padding_mask[i].nonzero() try: - print(nonzero[0]) + length += nonzero[0] conv_feat_all = torch.cat([conv_feat_all, features[i, :nonzero[0], :]]) except: + length += features.size()[1] conv_feat_all = torch.cat([conv_feat_all, features[i]]) print(conv_feat_all.size()) exit()