diff --git a/egs/librispeech/ASR/conformer_ctc/subsampling.py b/egs/librispeech/ASR/conformer_ctc/subsampling.py index ce25ad8ea..6a697aa0e 100644 --- a/egs/librispeech/ASR/conformer_ctc/subsampling.py +++ b/egs/librispeech/ASR/conformer_ctc/subsampling.py @@ -59,6 +59,14 @@ class Conv2dSubsampling(nn.Module): ) self.out = nn.Linear(odim * (((idim - 1) // 2 - 1) // 2), odim) self.out_norm = BasicNorm(odim) + self._reset_parameters() + + def _reset_parameters(self): + # init weights with smaller than default variance, because otherwise + # they learn too slowly in relative terms (assuming we're training with adam). + nn.init.normal_(self.conv[0].weight, std=0.05) + nn.init.constant_(self.conv[0].bias, 0.0) + def forward(self, x: torch.Tensor) -> torch.Tensor: """Subsample x. diff --git a/egs/librispeech/ASR/transducer_stateless/train.py b/egs/librispeech/ASR/transducer_stateless/train.py index c9654cc94..5d6d72490 100755 --- a/egs/librispeech/ASR/transducer_stateless/train.py +++ b/egs/librispeech/ASR/transducer_stateless/train.py @@ -110,7 +110,7 @@ def get_parser(): parser.add_argument( "--exp-dir", type=str, - default="transducer_stateless/specaugmod_baseline_randcombine1_expscale3_brelu2swish2_0.1_bnorm2ma0.5_pbs", + default="transducer_stateless/randcombine1_expscale3_brelu2swish2_0.1_bnorm2ma0.5_pbs_cinit", help="""The experiment dir. It specifies the directory where all training related files, e.g., checkpoints, log, etc, are saved