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 89eb296 commit 4e756c0Copy full SHA for 4e756c0
src/special/misc.jl
@@ -87,7 +87,7 @@ end
87
pow_by_square(x, StaticInt(N))
88
# @inline relu(x) = (y = zero(x); ifelse(x > y, x, y))
89
@inline relu(x) = (y = zero(x); ifelse(x < y, y, x))
90
-@inline leakyrelu(x, a = 0.01) = (y = zero(x); ifelse(x < y, x*a, x))
+@inline leakyrelu(x, a = 0.01) = (y = zero(x); a = convert(typeof(x), a); ifelse(x < y, x*a, x))
91
92
Base.sign(v::AbstractSIMD) = ifelse(v > 0, one(v), -one(v))
93
0 commit comments