From e46137d654801068d638af8771e535f90be6dee8 Mon Sep 17 00:00:00 2001 From: David Widmann Date: Fri, 24 May 2019 14:53:31 +0200 Subject: [PATCH] Remove stable sigmoid for non-dual numbers --- src/activation.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/activation.jl b/src/activation.jl index dd571a2b4..644681660 100644 --- a/src/activation.jl +++ b/src/activation.jl @@ -123,7 +123,7 @@ Return `log(cosh(x))` which is computed in a numerically stable way. logcosh(x::T) where T = x + softplus(-2x) - log(convert(T, 2)) # Provide an informative error message if activation functions are called with an array -for f in (:σ, :σ_stable, :logσ, :relu, :leakyrelu, :elu, :gelu, :swish, :selu, :softsign, :(StatsFuns.softplus), :logcosh) +for f in (:σ, :logσ, :relu, :leakyrelu, :elu, :gelu, :swish, :selu, :softsign, :(StatsFuns.softplus), :logcosh) @eval $(f)(x::AbstractArray, args...) = error("Use broadcasting (`", $(string(f)), ".(x)`) to apply activation functions to arrays.") end