Double learning rate of exp-scale units

This commit is contained in:
Daniel Povey 2022-03-04 00:42:37 +08:00
parent 5c177fc52b
commit 23b3aa233c
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
),
nn.ReLU(),
ExpScale(odim, 1, 1, speed=2.0),
ExpScale(odim, 1, 1, speed=4.0),
nn.Conv2d(
in_channels=odim, out_channels=odim, kernel_size=3, stride=2
),
nn.ReLU(),
ExpScale(odim, 1, 1, speed=2.0),
ExpScale(odim, 1, 1, speed=4.0),
)
self.out = nn.Linear(odim * (((idim - 1) // 2 - 1) // 2), odim)
self.out_norm = nn.LayerNorm(odim, elementwise_affine=False)

View File

@ -157,7 +157,7 @@ class ConformerEncoderLayer(nn.Module):
self.feed_forward = nn.Sequential(
nn.Linear(d_model, dim_feedforward),
Swish(),
ExpScale(dim_feedforward, speed=2.0),
ExpScale(dim_feedforward, speed=4.0),
nn.Dropout(dropout),
nn.Linear(dim_feedforward, d_model),
)
@ -165,7 +165,7 @@ class ConformerEncoderLayer(nn.Module):
self.feed_forward_macaron = nn.Sequential(
nn.Linear(d_model, dim_feedforward),
Swish(),
ExpScale(dim_feedforward, speed=2.0),
ExpScale(dim_feedforward, speed=4.0),
nn.Dropout(dropout),
nn.Linear(dim_feedforward, d_model),
)

View File

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