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
c615d82c04
commit
362ee800fa
Binary file not shown.
Binary file not shown.
@ -124,6 +124,11 @@ class Conformer(EncoderInterface):
|
||||
self.encoder = ConformerEncoder(encoder_layer, num_encoder_layers)
|
||||
self._init_state: List[torch.Tensor] = [torch.empty(0)]
|
||||
|
||||
self.group_size = 6
|
||||
self.alpha = nn.Parameter(torch.rand(self.group_size))
|
||||
self.sigmoid = nn.Sigmoid()
|
||||
self.layer_norm = nn.LayerNorm(512)
|
||||
|
||||
def forward(
|
||||
self, x: torch.Tensor, x_lens: torch.Tensor, warmup: float = 1.0
|
||||
) -> Tuple[torch.Tensor, torch.Tensor]:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user