diff options
Diffstat (limited to 'src/core/GLES_COMPUTE/cs_shaders/activation_layer_helpers_cs.h')
-rw-r--r-- | src/core/GLES_COMPUTE/cs_shaders/activation_layer_helpers_cs.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/GLES_COMPUTE/cs_shaders/activation_layer_helpers_cs.h b/src/core/GLES_COMPUTE/cs_shaders/activation_layer_helpers_cs.h index e5a89a830f..e0eacf8dc4 100644 --- a/src/core/GLES_COMPUTE/cs_shaders/activation_layer_helpers_cs.h +++ b/src/core/GLES_COMPUTE/cs_shaders/activation_layer_helpers_cs.h @@ -97,6 +97,11 @@ float srelu_op(float x) { return LOG_OP(ADD_OP(CONST_ONE, EXP_OP(x))); } +// ELU Activation +float elu_op(float x) +{ + return (x >= float(0.0)) ? x : MUL_OP(float(A_VAL), SUB_OP(EXP_OP(x), CONST_ONE)); +} // Absolute Activation float abs_op(float x) { |