Change max-keep-prob to 0.95

This commit is contained in:
Daniel Povey 2022-03-27 23:21:42 +08:00
parent 262388134d
commit 2cde99509f

View File

@ -231,7 +231,7 @@ class ConformerEncoderLayer(nn.Module):
# compensate for the small scale by just producing larger output. # compensate for the small scale by just producing larger output.
warmup = max(warmup, 0.1) warmup = max(warmup, 0.1)
if self.training: if self.training:
warmup = min(warmup, 0.99) # effectively, layer-drop with 1-in-100 prob. warmup = min(warmup, 0.95) # effectively, layer-drop with 1-in-20 prob.
alpha = 1.0 if torch.rand(()).item() <= warmup else 0.1 alpha = 1.0 if torch.rand(()).item() <= warmup else 0.1
# macaron style feed forward module # macaron style feed forward module