diff options
Diffstat (limited to 'src/core/CL/cl_kernels/activation_float_helpers.h')
-rw-r--r-- | src/core/CL/cl_kernels/activation_float_helpers.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/CL/cl_kernels/activation_float_helpers.h b/src/core/CL/cl_kernels/activation_float_helpers.h index 2efd2699d7..0c82f83dbc 100644 --- a/src/core/CL/cl_kernels/activation_float_helpers.h +++ b/src/core/CL/cl_kernels/activation_float_helpers.h @@ -50,6 +50,9 @@ // Soft RELU Activation #define srelu_op(DATA_TYPE, x, A_VAL, B_VAL) (log((DATA_TYPE)1.0 + exp(x))) +// ELU Activation +#define elu_op(DATA_TYPE, x, A_VAL, B_VAL) (select(((DATA_TYPE)A_VAL * (exp(x) - (DATA_TYPE)1.0)), x, isgreaterequal(x, (DATA_TYPE)0.0))) + // Absolute Activation #define abs_op(DATA_TYPE, x, A_VAL, B_VAL) (fabs(x)) |