From 16cf3c2318978580006633ea4d5eccdd8ba1194a Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Thu, 10 Sep 2020 20:26:48 +0100 Subject: COMPMID-3764: Failures on fp16 for L2NormalizationLayer when zero inputs Alter the default lower bound used for the norm from 1e-12 to 1e-6 to be representable by the half precision dynamic range. Signed-off-by: Georgios Pinitas Change-Id: I8d3103b8345eb4c464a76b4f4ba5ef596d81da93 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3960 Tested-by: Arm Jenkins Reviewed-by: Michele Di Giorgio Comments-Addressed: Arm Jenkins --- tests/validation/NEON/L2NormalizeLayer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/validation/NEON/L2NormalizeLayer.cpp') diff --git a/tests/validation/NEON/L2NormalizeLayer.cpp b/tests/validation/NEON/L2NormalizeLayer.cpp index 37146f4015..82e4beb05a 100644 --- a/tests/validation/NEON/L2NormalizeLayer.cpp +++ b/tests/validation/NEON/L2NormalizeLayer.cpp @@ -100,7 +100,7 @@ TEST_SUITE(FP32) FIXTURE_DATA_TEST_CASE(RunSmall, NEL2NormalizeLayerFixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(datasets::SmallShapes(), framework::dataset::make("DataType", DataType::F32)), framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), framework::dataset::make("Axis", { -1, 0, 1, 2 })), - framework::dataset::make("Epsilon", { 1e-12 }))) + framework::dataset::make("Epsilon", { 1e-6 }))) { // Validate output validate(Accessor(_target), _reference, tolerance_f32); @@ -109,7 +109,7 @@ FIXTURE_DATA_TEST_CASE(RunSmall, NEL2NormalizeLayerFixture, framework::Da FIXTURE_DATA_TEST_CASE(RunLarge, NEL2NormalizeLayerFixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeShapes(), framework::dataset::make("DataType", DataType::F32)), framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), framework::dataset::make("Axis", { -1, 0, 2 })), - framework::dataset::make("Epsilon", { 1e-12 }))) + framework::dataset::make("Epsilon", { 1e-6 }))) { // Validate output validate(Accessor(_target), _reference, tolerance_f32); @@ -121,7 +121,7 @@ TEST_SUITE(FP16) FIXTURE_DATA_TEST_CASE(RunSmall, NEL2NormalizeLayerFixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(datasets::SmallShapes(), framework::dataset::make("DataType", DataType::F16)), framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), framework::dataset::make("Axis", { -1, 0, 1, 2 })), - framework::dataset::make("Epsilon", { 1e-12 }))) + framework::dataset::make("Epsilon", { 1e-6 }))) { // Validate output validate(Accessor(_target), _reference, tolerance_f16); @@ -130,7 +130,7 @@ FIXTURE_DATA_TEST_CASE(RunSmall, NEL2NormalizeLayerFixture, framework::Dat FIXTURE_DATA_TEST_CASE(RunLarge, NEL2NormalizeLayerFixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeShapes(), framework::dataset::make("DataType", DataType::F16)), framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), framework::dataset::make("Axis", { -1, 0, 2 })), - framework::dataset::make("Epsilon", { 1e-12 }))) + framework::dataset::make("Epsilon", { 1e-6 }))) { // Validate output validate(Accessor(_target), _reference, tolerance_f16); -- cgit v1.2.1