From 3463a8b9eed57340366743340d2d06df3aa1ae88 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Thu, 23 Aug 2018 13:11:53 +0100 Subject: 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 Reviewed-by: Anthony Barbier --- tests/validation/Helpers.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/validation/Helpers.h') 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 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); -- cgit v1.2.1