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
|
## for prompt tuning
|
||||||
if prompt is not None:
|
if prompt is not None:
|
||||||
print(features.size())
|
|
||||||
conv_feat_all = torch.tensor([]).to(features.device)
|
conv_feat_all = torch.tensor([]).to(features.device)
|
||||||
|
length = 0
|
||||||
for i in range(padding_mask.size()[0]):
|
for i in range(padding_mask.size()[0]):
|
||||||
nonzero = padding_mask[i].nonzero()
|
nonzero = padding_mask[i].nonzero()
|
||||||
try:
|
try:
|
||||||
print(nonzero[0])
|
length += nonzero[0]
|
||||||
conv_feat_all = torch.cat([conv_feat_all, features[i, :nonzero[0], :]])
|
conv_feat_all = torch.cat([conv_feat_all, features[i, :nonzero[0], :]])
|
||||||
except:
|
except:
|
||||||
|
length += features.size()[1]
|
||||||
conv_feat_all = torch.cat([conv_feat_all, features[i]])
|
conv_feat_all = torch.cat([conv_feat_all, features[i]])
|
||||||
print(conv_feat_all.size())
|
print(conv_feat_all.size())
|
||||||
exit()
|
exit()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user