from local

This commit is contained in:
dohe0342 2023-04-26 12:29:31 +09:00
parent d0fa4f0224
commit ae4be2ce1e
2 changed files with 14 additions and 14 deletions

View File

@ -490,6 +490,7 @@ class Data2VecAudioModel(BaseFairseqModel):
## for prompt tuning
if prompt is not None:
if 1:
conv_feat_all = torch.tensor([]).to(features.device)
length = 0
for i in range(padding_mask.size()[0]):
@ -503,7 +504,6 @@ class Data2VecAudioModel(BaseFairseqModel):
randint = np.random.randint(10000)
np.save(f'/home/work/workspace/icefall/egs/librispeech/ASR/conv_feat/{randint}.npy', conv_feat_all.cpu().numpy())
exit()
prompt = prompt.expand((features.size()[0], prompt.size()[0], prompt.size()[1]))
features = torch.cat([prompt, features], dim=1)