diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2019-08-22 17:10:04 +0100 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2019-08-23 11:03:19 +0000 |
commit | fb0fdcdaec57e6f8e1b96f924411921cc0ba6d94 (patch) | |
tree | 99dc659420ea76dc4fbf6724e1140467249ad105 /src/core/GLES_COMPUTE/cs_shaders/activation_layer_helpers_cs.h | |
parent | c8530210c17b391f27ace95523e9590e8166fcd8 (diff) | |
download | ComputeLibrary-fb0fdcdaec57e6f8e1b96f924411921cc0ba6d94.tar.gz |
COMPMID-2460: Add ELU activation on NEON,CL,GLES
Change-Id: I641b12fcfc5dc4a18d2d489c38673b937125dfb9
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Reviewed-on: https://review.mlplatform.org/c/1796
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
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) { |