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
38af1289c5
commit
31e73509b2
Binary file not shown.
Binary file not shown.
@ -135,7 +135,7 @@ class Conformer(EncoderInterface):
|
||||
)
|
||||
self._init_state: List[torch.Tensor] = [torch.empty(0)]
|
||||
|
||||
self.group_size = 6
|
||||
self.group_size = 12
|
||||
self.alpha = nn.Parameter(torch.rand(self.group_size))
|
||||
self.sigmoid = nn.Sigmoid()
|
||||
self.layer_norm = nn.LayerNorm(512)
|
||||
@ -206,7 +206,7 @@ class Conformer(EncoderInterface):
|
||||
|
||||
layer_output = [x.permute(1, 0, 2) for x in layer_output]
|
||||
|
||||
x = self.layer_norm(1/6*(self.sigmoid(self.alpha[0])*layer_output[1] + \
|
||||
x = self.layer_norm(1/12*(self.sigmoid(self.alpha[0])*layer_output[1] + \
|
||||
self.sigmoid(self.alpha[1])*layer_output[3] + \
|
||||
self.sigmoid(self.alpha[2])*layer_output[5] + \
|
||||
self.sigmoid(self.alpha[3])*layer_output[7] + \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user