Skip to content

Commit c07c12c

Browse files
committed
Update error message
1 parent 0d49b07 commit c07c12c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/activation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,5 +121,5 @@ softplus(x::Real) = ifelse(x > 0, x + log1p(exp(-x)), log1p(exp(x)))
121121
# Provide an informative error message if activation functions are called with an array
122122
for f in (, :σ_stable, :logσ, :relu, :leakyrelu, :elu, :gelu, :swish, :selu, :softsign, :softplus)
123123
@eval $(f)(x::AbstractArray, args...) =
124-
error("Use explicit invocations such as `", $(string(f)), ".(x)` to apply activation functions to tensors!")
124+
error("Use broadcasting (`", $(string(f)), ".(x)`) to apply activation functions to arrays.")
125125
end

0 commit comments

Comments
 (0)