mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-10 10:32:17 +00:00
Cosmetic change
This commit is contained in:
parent
a24572abd1
commit
b7b2d8970b
@ -171,7 +171,7 @@ class ConformerEncoderLayer(nn.Module):
|
|||||||
max_factor=0.01),
|
max_factor=0.01),
|
||||||
SwishExpScale(dim_feedforward, speed=20.0),
|
SwishExpScale(dim_feedforward, speed=20.0),
|
||||||
nn.Dropout(dropout),
|
nn.Dropout(dropout),
|
||||||
ScaledLinear(dim_feedforward, d_model),
|
ScaledLinear(dim_feedforward, d_model, initial_scale=0.25),
|
||||||
)
|
)
|
||||||
|
|
||||||
self.conv_module = ConvolutionModule(d_model, cnn_module_kernel)
|
self.conv_module = ConvolutionModule(d_model, cnn_module_kernel)
|
||||||
@ -208,9 +208,6 @@ class ConformerEncoderLayer(nn.Module):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# macaron style feed forward module
|
# macaron style feed forward module
|
||||||
residual = src
|
|
||||||
|
|
||||||
|
|
||||||
src = src + self.dropout(self.feed_forward_macaron(src))
|
src = src + self.dropout(self.feed_forward_macaron(src))
|
||||||
|
|
||||||
|
|
||||||
@ -872,6 +869,7 @@ class ConvolutionModule(nn.Module):
|
|||||||
stride=1,
|
stride=1,
|
||||||
padding=0,
|
padding=0,
|
||||||
bias=bias,
|
bias=bias,
|
||||||
|
initial_scale=0.5
|
||||||
)
|
)
|
||||||
|
|
||||||
def forward(self, x: Tensor) -> Tensor:
|
def forward(self, x: Tensor) -> Tensor:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user