diff --git a/egs/librispeech/ASR/conformer_ctc/subsampling.py b/egs/librispeech/ASR/conformer_ctc/subsampling.py index c97f1ef48..0e5e2d3de 100644 --- a/egs/librispeech/ASR/conformer_ctc/subsampling.py +++ b/egs/librispeech/ASR/conformer_ctc/subsampling.py @@ -47,11 +47,11 @@ class Conv2dSubsampling(nn.Module): nn.Conv2d( in_channels=1, out_channels=odim, kernel_size=3, stride=2 ), - PeLU(cutoff=-1.0), + nn.ReLU(), nn.Conv2d( in_channels=odim, out_channels=odim, kernel_size=3, stride=2 ), - PeLU(cutoff=-5.0), + nn.ReLU(), ) self.out = nn.Linear(odim * (((idim - 1) // 2 - 1) // 2), odim) self.out_norm = nn.LayerNorm(odim, elementwise_affine=False) diff --git a/egs/librispeech/ASR/transducer_stateless/conformer.py b/egs/librispeech/ASR/transducer_stateless/conformer.py index 066232a02..2b97047cf 100644 --- a/egs/librispeech/ASR/transducer_stateless/conformer.py +++ b/egs/librispeech/ASR/transducer_stateless/conformer.py @@ -156,14 +156,14 @@ class ConformerEncoderLayer(nn.Module): self.feed_forward = nn.Sequential( nn.Linear(d_model, dim_feedforward), - PeLU(), + Swish(), nn.Dropout(dropout), nn.Linear(dim_feedforward, d_model), ) self.feed_forward_macaron = nn.Sequential( nn.Linear(d_model, dim_feedforward), - PeLU(), + Swish(), nn.Dropout(dropout), nn.Linear(dim_feedforward, d_model), ) @@ -882,7 +882,7 @@ class ConvolutionModule(nn.Module): padding=0, bias=bias, ) - self.activation = PeLU() + self.activation = Swish() def forward(self, x: Tensor) -> Tensor: """Compute convolution module. diff --git a/egs/librispeech/ASR/transducer_stateless/train.py b/egs/librispeech/ASR/transducer_stateless/train.py index 88b366245..283aaecdd 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_pelu", + default="transducer_stateless/specaugmod_baseline_randcombine1_pelu_base", help="""The experiment dir. It specifies the directory where all training related files, e.g., checkpoints, log, etc, are saved