We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df901ba commit c7ad3eaCopy full SHA for c7ad3ea
ext/ReactantNNlibExt/Implementations.jl
@@ -13,15 +13,15 @@ if isdefined(NNlib, :gelu_tanh)
13
α = NNlib.oftf(x, 0.044715)
14
half = NNlib.oftf(x, 0.5)
15
λ = sqrt(NNlib.oftf(x, 2 / pi))
16
- return x * half * (1 + tanh(λ * (x + α * x^3)))
+ return x * (half * (1 + tanh(λ * (x + α * x^3))))
17
end
18
else
19
# Older versions of NNlib do not have gelu_tanh (gelu refers to the tanh version)
20
function NNlib.gelu(x::TracedRNumber)
21
22
23
24
25
26
27
0 commit comments