diff --git a/egs/librispeech/ASR/transducer_stateless/conformer.py b/egs/librispeech/ASR/transducer_stateless/conformer.py index 65a8431de..07fe934ae 100644 --- a/egs/librispeech/ASR/transducer_stateless/conformer.py +++ b/egs/librispeech/ASR/transducer_stateless/conformer.py @@ -861,7 +861,8 @@ class ConvolutionModule(nn.Module): # constrain the rms values to a reasonable range via a constraint of max_abs=10.0, # it will be in a better position to start learning something, i.e. to latch onto # the correct range. - self.deriv_balancer1 = DerivBalancer(channel_dim=1, max_abs=10.0) + self.deriv_balancer = DerivBalancer(channel_dim=1, max_abs=10.0, + min_positive=0.0, max_positive=1.0) self.depthwise_conv = ScaledConv1d( channels, @@ -873,8 +874,6 @@ class ConvolutionModule(nn.Module): bias=bias, ) - - self.deriv_balancer2 = DerivBalancer(channel_dim=1) # shape: (channels, 1), broadcasts with (batch, channel, time). self.activation = SwishOffset() @@ -904,13 +903,12 @@ class ConvolutionModule(nn.Module): # GLU mechanism x = self.pointwise_conv1(x) # (batch, 2*channels, time) - x = self.deriv_balancer1(x) + x = self.deriv_balancer(x) x = nn.functional.glu(x, dim=1) # (batch, channels, time) # 1D Depthwise Conv x = self.depthwise_conv(x) - x = self.deriv_balancer2(x) x = self.activation(x) x = self.pointwise_conv2(x) # (batch, channel, time) diff --git a/egs/librispeech/ASR/transducer_stateless/train.py b/egs/librispeech/ASR/transducer_stateless/train.py index a0395a398..f2d89b099 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/randcombine1_expscale3_rework2c_maxabs1000_maxp0.95_noexp_convderiv", + default="transducer_stateless/randcombine1_expscale3_rework2c_maxabs1000_maxp0.95_noexp_convderiv2", help="""The experiment dir. It specifies the directory where all training related files, e.g., checkpoints, log, etc, are saved