from local

This commit is contained in:
dohe0342 2023-04-28 10:12:40 +09:00
parent 95b49bb365
commit db90fb1abd
3 changed files with 4 additions and 4 deletions

View File

@ -84,11 +84,10 @@ class Transducer(nn.Module):
print(self.sid)
print('-'*20)
if prompt:
self.prompt = torch.randn((200, 512), requires_grad=True)
statistic = open(f'/home/work/workspace/icefall/egs/librispeech/ASR/conv_feat/{self.sid}/{sid}_statistic.txt', 'r').readlines()
#statistic = open(f'/home/work/workspace/icefall/egs/librispeech/ASR/conv_feat/{self.sid}/{sid}_statistic.txt', 'r').readlines()
self.prompt = torch.nn.Parameter(torch.rand((50, 512)))
print(self.prompt)
#print(self.prompt)
'''
new_emb = torch.empty(512, 50)
for i in range(512):
mean, std = statistic[i].strip().split(' ')
@ -98,6 +97,7 @@ class Transducer(nn.Module):
new_emb = new_emb.transpose(1,0)
self.prompt = torch.nn.Parameter(new_emb)
print(self.prompt)
'''
def forward(
self,