Skip to content

Commit

Permalink
Initialize BiasNorm bias with small random values (#1630)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaozengwei committed May 20, 2024
1 parent 68980c5 commit 0df406c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion egs/librispeech/ASR/zipformer/scaling.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ def __init__(
self.num_channels = num_channels
self.channel_dim = channel_dim
self.log_scale = nn.Parameter(torch.tensor(log_scale))
self.bias = nn.Parameter(torch.zeros(num_channels))
self.bias = nn.Parameter(torch.empty(num_channels).normal_(mean=0, std=1e-4))

self.log_scale_min = log_scale_min
self.log_scale_max = log_scale_max
Expand Down

0 comments on commit 0df406c

Please sign in to comment.