diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2018-08-23 13:11:53 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:54:54 +0000 |
commit | 3463a8b9eed57340366743340d2d06df3aa1ae88 (patch) | |
tree | dda328b4fc59fb0a9f7a930a25ef65ce8f20e179 /tests/validation/Helpers.h | |
parent | 2113b9d9ada3a392b1215c4afd7715249d629bfc (diff) | |
download | ComputeLibrary-3463a8b9eed57340366743340d2d06df3aa1ae88.tar.gz |
COMPMID-1534: Fix NEActivationLayer for FP16
Simulates Logistic, Tanh and SoftRelu in FP32
Change-Id: I9950f7636b8ff2f3e054937e5ef414e45dfe06f5
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/145357
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'tests/validation/Helpers.h')
-rw-r--r-- | tests/validation/Helpers.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/validation/Helpers.h b/tests/validation/Helpers.h index 814d1f5ed0..e5ba14849d 100644 --- a/tests/validation/Helpers.h +++ b/tests/validation/Helpers.h @@ -70,15 +70,16 @@ std::pair<T, T> get_activation_layer_test_bounds(ActivationLayerInfo::Activation switch(activation) { + case ActivationLayerInfo::ActivationFunction::TANH: case ActivationLayerInfo::ActivationFunction::SQUARE: case ActivationLayerInfo::ActivationFunction::LOGISTIC: case ActivationLayerInfo::ActivationFunction::SOFT_RELU: // Reduce range as exponent overflows - bounds = std::make_pair(-10._h, 10._h); + bounds = std::make_pair(-2._h, 2._h); break; case ActivationLayerInfo::ActivationFunction::SQRT: // Reduce range as sqrt should take a non-negative number - bounds = std::make_pair(0._h, 255._h); + bounds = std::make_pair(0._h, 128._h); break; default: bounds = std::make_pair(-255._h, 255._h); |