We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb3b606 commit 300676aCopy full SHA for 300676a
1 file changed
modules/commons/common_layers.py
@@ -120,8 +120,8 @@ def forward(self, x):
120
gate_min, gate_max = torch.aminmax(gate.detach())
121
max_abs_out = torch.max(-out_min, out_max).float()
122
max_abs_gate = torch.max(-gate_min, gate_max).float()
123
- if max_abs_out * max_abs_gate > 65504:
124
- return (out.float() * gate.float()).clamp(-65504, 65504).half()
+ if max_abs_out * max_abs_gate > 1000:
+ return (out.float() * gate.float()).clamp(-1000, 1000).half()
125
return out * gate
126
127
0 commit comments