Remove extra layer norm in the conformer encoder layer.

This commit is contained in:
Fangjun Kuang 2022-03-11 14:48:08 +08:00
parent 726c92c476
commit ec78b7ef72

View File

@ -180,9 +180,6 @@ class ConformerEncoderLayer(nn.Module):
self.ff_scale = 0.5
self.norm_conv = nn.LayerNorm(d_model) # for the CNN module
self.norm_final = nn.LayerNorm(
d_model
) # for the final output of the block
self.dropout = nn.Dropout(dropout)
@ -254,9 +251,6 @@ class ConformerEncoderLayer(nn.Module):
if not self.normalize_before:
src = self.norm_ff(src)
if self.normalize_before:
src = self.norm_final(src)
return src