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
9252c1d80a
commit
62d4c24d69
Binary file not shown.
@ -492,15 +492,9 @@ class Data2VecAudioModel(BaseFairseqModel):
|
||||
if prompt is not None:
|
||||
#features = torch.cat([features, prompt])
|
||||
prompt = prompt.expand((features.size()[0], prompt.size()[0], prompt.size()[1]))
|
||||
print(prompt.size())
|
||||
print(features.size())
|
||||
features = torch.cat([prompt, features], dim=1)
|
||||
print(features.size())
|
||||
prompt_padding_mask = torch.zeros(prompt.size()[0], prompt.size()[1]).type(torch.BoolTensor).to(features.device)
|
||||
print(prompt_padding_mask.size())
|
||||
print(padding_mask.size())
|
||||
padding_mask = torch.cat([prompt_padding_mask, padding_mask], dim=1)
|
||||
print(padding_mask.size())
|
||||
|
||||
features = self.layer_norm(features)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user