diff options
Diffstat (limited to 'tests/validation/CL')
-rw-r--r-- | tests/validation/CL/L2NormalizeLayer.cpp | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/tests/validation/CL/L2NormalizeLayer.cpp b/tests/validation/CL/L2NormalizeLayer.cpp index fdbfa3ed4d..beedd81335 100644 --- a/tests/validation/CL/L2NormalizeLayer.cpp +++ b/tests/validation/CL/L2NormalizeLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -46,8 +46,8 @@ namespace constexpr AbsoluteTolerance<float> tolerance_f32(0.00001f); constexpr AbsoluteTolerance<float> tolerance_f16(0.2f); -auto data = concat(combine(framework::dataset::make("DataLayout", { DataLayout::NCHW }), framework::dataset::make("Axis", { 0, 1, 2 })), combine(framework::dataset::make("DataLayout", { DataLayout::NHWC }), - framework::dataset::make("Axis", { 1, 2 }))); +auto data = concat(combine(framework::dataset::make("DataLayout", { DataLayout::NCHW }), framework::dataset::make("Axis", { -1, 0, 2 })), combine(framework::dataset::make("DataLayout", { DataLayout::NHWC }), + framework::dataset::make("Axis", { -2, 2 }))); } // namespace @@ -61,8 +61,9 @@ DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip( TensorInfo(TensorShape(128U, 64U), 1, DataType::F32), // Mismatching shape input/output TensorInfo(TensorShape(128U, 64U), 2, DataType::F32), // Number of Input channels != 1 TensorInfo(TensorShape(128U, 64U), 1, DataType::S16), // DataType != F32 - TensorInfo(TensorShape(128U, 64U), 1, DataType::F32), // Axis >= num_max_dimensions - TensorInfo(TensorShape(128U, 64U), 1, DataType::F32), // Axis > 2 + TensorInfo(TensorShape(128U, 64U), 1, DataType::F32), + TensorInfo(TensorShape(128U, 64U), 1, DataType::F32), + TensorInfo(TensorShape(128U, 64U), 1, DataType::F32), TensorInfo(TensorShape(128U, 64U), 1, DataType::F32) }), framework::dataset::make("OutputInfo", { TensorInfo(TensorShape(128U, 64U), 1, DataType::F16), @@ -71,10 +72,19 @@ DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip( TensorInfo(TensorShape(128U, 64U), 1, DataType::S16), TensorInfo(TensorShape(128U, 64U), 1, DataType::F32), TensorInfo(TensorShape(128U, 64U), 1, DataType::F32), + TensorInfo(TensorShape(128U, 64U), 1, DataType::F32), TensorInfo(TensorShape(128U, 64U), 1, DataType::F32) })), - framework::dataset::make("Axis", { 0U, 0U, 0U, 0U, static_cast<unsigned int>(TensorShape::num_max_dimensions), 3U, 0U })), - framework::dataset::make("Expected", { false, false, false, false, false, false, true })), + framework::dataset::make("Axis", { + 0, + 0, + 0, + 0, + static_cast<int>(TensorShape::num_max_dimensions), + 3, + -2, + 0 })), + framework::dataset::make("Expected", { false, false, false, false, true, true, true, true })), input_info, output_info, axis, expected) { bool is_valid = bool(CLL2NormalizeLayer::validate(&input_info.clone()->set_is_resizable(false), |