mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-12-11 06:55:27 +00:00
from local
This commit is contained in:
parent
9b05cef7e8
commit
942e813915
Binary file not shown.
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user