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
892cce0a1b
commit
ee42fa7cb5
Binary file not shown.
@ -80,7 +80,15 @@ class Transducer(nn.Module):
|
||||
self.prompt = None
|
||||
if prompt:
|
||||
#self.prompt = torch.randn((200, 512), requires_grad=True)
|
||||
statistic = open('/home/work/workspace/icefall/egs/librispeech/ASR/conv_feat/2094_statistic.txt', 'r').readlines()
|
||||
self.prompt = torch.nn.Parameter(torch.rand((50, 512)))
|
||||
print(self.prompt)
|
||||
|
||||
new_emb = torch.empty(512, 50)
|
||||
for i in range(512):
|
||||
mean, std = statistic[i].strip().split(' ')
|
||||
new_emb[i] = torch.normal(float(mean), float(std), size=50).squeeze()
|
||||
|
||||
|
||||
def forward(
|
||||
self,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user