mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-12-11 06:55:27 +00:00
Change offset
This commit is contained in:
parent
f0f204552d
commit
c71a3c6098
@ -1118,7 +1118,7 @@ class DoubleSwishFunction(torch.autograd.Function):
|
|||||||
assert d_scaled.max() < 256.0
|
assert d_scaled.max() < 256.0
|
||||||
d_int = d_scaled.to(torch.uint8)
|
d_int = d_scaled.to(torch.uint8)
|
||||||
ctx.save_for_backward(d_int)
|
ctx.save_for_backward(d_int)
|
||||||
y = y + alpha * x + beta * x.clamp(min=-x_limit, max=x_limit) + -0.05
|
y = y + alpha * x + beta * x.clamp(min=-x_limit, max=x_limit) + 0.075
|
||||||
if x.dtype == torch.float16 or torch.is_autocast_enabled():
|
if x.dtype == torch.float16 or torch.is_autocast_enabled():
|
||||||
y = y.to(torch.float16)
|
y = y.to(torch.float16)
|
||||||
return y
|
return y
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user