mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-10 10:32:17 +00:00
Remove final dropout
This commit is contained in:
parent
92ec2e356e
commit
45f872c27d
@ -80,7 +80,6 @@ class Conformer(EncoderInterface):
|
|||||||
)
|
)
|
||||||
self.encoder = ConformerEncoder(encoder_layer, num_encoder_layers)
|
self.encoder = ConformerEncoder(encoder_layer, num_encoder_layers)
|
||||||
|
|
||||||
self.final_dropout = nn.Dropout(p=dropout)
|
|
||||||
if output_dim == d_model:
|
if output_dim == d_model:
|
||||||
self.encoder_output_layer = nn.Identity()
|
self.encoder_output_layer = nn.Identity()
|
||||||
else:
|
else:
|
||||||
@ -119,7 +118,6 @@ class Conformer(EncoderInterface):
|
|||||||
x = self.encoder(x, pos_emb, src_key_padding_mask=mask,
|
x = self.encoder(x, pos_emb, src_key_padding_mask=mask,
|
||||||
warmup=warmup) # (T, N, C)
|
warmup=warmup) # (T, N, C)
|
||||||
|
|
||||||
x = self.final_dropout(x)
|
|
||||||
x = self.encoder_output_layer(x)
|
x = self.encoder_output_layer(x)
|
||||||
x = x.permute(1, 0, 2) # (T, N, C) ->(N, T, C)
|
x = x.permute(1, 0, 2) # (T, N, C) ->(N, T, C)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user