Reduce initial_speed

This commit is contained in:
Daniel Povey 2022-03-31 13:03:26 +08:00
parent c67ae0f3a1
commit e59db01b7c

View File

@ -61,8 +61,10 @@ class Transducer(nn.Module):
self.decoder = decoder
self.joiner = joiner
self.simple_am_proj = ScaledLinear(embedding_dim, vocab_size)
self.simple_lm_proj = ScaledLinear(embedding_dim, vocab_size)
self.simple_am_proj = ScaledLinear(embedding_dim, vocab_size,
initial_speed=0.5)
self.simple_lm_proj = ScaledLinear(embedding_dim, vocab_size,
initial_speed=0.5)
with torch.no_grad():
# Initialize the two projections to be the same; this will be
# convenient for the real joiner, which adds the endcoder