mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-12-11 06:55:27 +00:00
from local
This commit is contained in:
parent
ed626085e0
commit
a82af91f52
Binary file not shown.
@ -130,6 +130,13 @@ class Conformer(Transformer):
|
||||
),
|
||||
)
|
||||
|
||||
self.group_num = group_num
|
||||
if self.group_num != 0:
|
||||
self.group_layer_num = int(num_encoder_layers // self.group_num)
|
||||
self.alpha = nn.Parameter(torch.rand(self.group_num))
|
||||
self.sigmoid = nn.Sigmoid()
|
||||
self.layer_norm = nn.LayerNorm(d_model)
|
||||
|
||||
def run_encoder(
|
||||
self,
|
||||
x: torch.Tensor,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user