Reduce scale from 50 to 20

This commit is contained in:
Daniel Povey 2022-03-04 15:56:45 +08:00
parent 9cc5999829
commit eb3ed54202
2 changed files with 5 additions and 5 deletions

View File

@ -48,12 +48,12 @@ class Conv2dSubsampling(nn.Module):
in_channels=1, out_channels=odim, kernel_size=3, stride=2
),
nn.ReLU(),
ExpScale(odim, 1, 1, speed=50.0),
ExpScale(odim, 1, 1, speed=20.0),
nn.Conv2d(
in_channels=odim, out_channels=odim, kernel_size=3, stride=2
),
nn.ReLU(),
ExpScale(odim, 1, 1, speed=50.0),
ExpScale(odim, 1, 1, speed=20.0),
)
self.out = nn.Linear(odim * (((idim - 1) // 2 - 1) // 2), odim)
self.out_norm = nn.LayerNorm(odim, elementwise_affine=False)

View File

@ -156,14 +156,14 @@ class ConformerEncoderLayer(nn.Module):
self.feed_forward = nn.Sequential(
nn.Linear(d_model, dim_feedforward),
ExpScaleSwish(dim_feedforward, speed=50.0),
ExpScaleSwish(dim_feedforward, speed=20.0),
nn.Dropout(dropout),
nn.Linear(dim_feedforward, d_model),
)
self.feed_forward_macaron = nn.Sequential(
nn.Linear(d_model, dim_feedforward),
ExpScaleSwish(dim_feedforward, speed=50.0),
ExpScaleSwish(dim_feedforward, speed=20.0),
nn.Dropout(dropout),
nn.Linear(dim_feedforward, d_model),
)
@ -874,7 +874,7 @@ class ConvolutionModule(nn.Module):
bias=bias,
)
# shape: (channels, 1), broadcasts with (batch, channel, time).
self.activation = ExpScaleSwish(channels, 1, speed=50.0)
self.activation = ExpScaleSwish(channels, 1, speed=20.0)
self.pointwise_conv2 = nn.Conv1d(
channels,