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
8db84cbfd4
commit
19e1c1ee3a
Binary file not shown.
Binary file not shown.
@ -194,9 +194,12 @@ class Conformer(Transformer):
|
||||
|
||||
if self.group_num > 0:
|
||||
x = 0
|
||||
if self.learnable_alpha:
|
||||
for enum, alpha in enumerate(self.alpha):
|
||||
if self.learnable_alpha: x += self.sigmoid(alpha) * layer_outputs[(enum+1)*self.group_layer_num-1]
|
||||
else: x += (1/self.group_num) * layer_outputs[(enum+1)*self.group_layer_num-1]
|
||||
x += self.sigmoid(alpha) * layer_outputs[(enum+1)*self.group_layer_num-1]
|
||||
else:
|
||||
for enum in range(self.group_num):
|
||||
x += (1/self.group_num) * layer_outputs[(enum+1)*self.group_layer_num-1]
|
||||
x = self.layer_norm(x)
|
||||
|
||||
if self.interctc or self.interctc_condition or self.group_num > 0:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user