mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-10 10:32:17 +00:00
Reduce layer-drop prob after warmup to 1 in 100
This commit is contained in:
parent
b43468bb67
commit
953aecf5e3
@ -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.98) # effectively, layer-drop with 1-in-50 prob.
|
warmup = min(warmup, 0.99) # effectively, layer-drop with 1-in-100 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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user