Increase scale from 20 to 50.

This commit is contained in:
Daniel Povey 2022-03-04 14:31:29 +08:00
parent 3207bd98a9
commit 7e88999641
3 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 in_channels=1, out_channels=odim, kernel_size=3, stride=2
), ),
nn.ReLU(), nn.ReLU(),
ExpScale(odim, 1, 1, speed=20.0), ExpScale(odim, 1, 1, speed=50.0),
nn.Conv2d( nn.Conv2d(
in_channels=odim, out_channels=odim, kernel_size=3, stride=2 in_channels=odim, out_channels=odim, kernel_size=3, stride=2
), ),
nn.ReLU(), nn.ReLU(),
ExpScale(odim, 1, 1, speed=20.0), ExpScale(odim, 1, 1, speed=50.0),
) )
self.out = nn.Linear(odim * (((idim - 1) // 2 - 1) // 2), odim) self.out = nn.Linear(odim * (((idim - 1) // 2 - 1) // 2), odim)
self.out_norm = nn.LayerNorm(odim, elementwise_affine=False) self.out_norm = nn.LayerNorm(odim, elementwise_affine=False)

View File

@ -156,7 +156,7 @@ class ConformerEncoderLayer(nn.Module):
self.feed_forward = nn.Sequential( self.feed_forward = nn.Sequential(
nn.Linear(d_model, dim_feedforward), nn.Linear(d_model, dim_feedforward),
ExpScaleSwish(dim_feedforward, speed=20.0), ExpScaleSwish(dim_feedforward, speed=50.0),
nn.Dropout(dropout), nn.Dropout(dropout),
nn.Linear(dim_feedforward, d_model), nn.Linear(dim_feedforward, d_model),
) )
@ -164,7 +164,7 @@ class ConformerEncoderLayer(nn.Module):
self.feed_forward_macaron = nn.Sequential( self.feed_forward_macaron = nn.Sequential(
nn.Linear(d_model, dim_feedforward), nn.Linear(d_model, dim_feedforward),
Swish(), Swish(),
ExpScaleSwish(dim_feedforward, speed=20.0), ExpScaleSwish(dim_feedforward, speed=50.0),
nn.Dropout(dropout), nn.Dropout(dropout),
nn.Linear(dim_feedforward, d_model), nn.Linear(dim_feedforward, d_model),
) )

View File

@ -110,7 +110,7 @@ def get_parser():
parser.add_argument( parser.add_argument(
"--exp-dir", "--exp-dir",
type=str, type=str,
default="transducer_stateless/specaugmod_baseline_randcombine1_expscale3", default="transducer_stateless/specaugmod_baseline_randcombine1_expscale4",
help="""The experiment dir. help="""The experiment dir.
It specifies the directory where all training related It specifies the directory where all training related
files, e.g., checkpoints, log, etc, are saved files, e.g., checkpoints, log, etc, are saved