diff options
-rw-r--r-- | tests/datasets/RandomBatchNormalizationLayerDataset.h | 6 | ||||
-rw-r--r-- | tests/datasets/ShapeDatasets.h | 2 | ||||
-rw-r--r-- | tests/validation/CL/DepthwiseConvolutionLayerNative.cpp | 1 | ||||
-rw-r--r-- | tests/validation/Validation.h | 8 |
4 files changed, 10 insertions, 7 deletions
diff --git a/tests/datasets/RandomBatchNormalizationLayerDataset.h b/tests/datasets/RandomBatchNormalizationLayerDataset.h index 5a49dd702b..4ccb2eaaba 100644 --- a/tests/datasets/RandomBatchNormalizationLayerDataset.h +++ b/tests/datasets/RandomBatchNormalizationLayerDataset.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 Arm Limited. + * Copyright (c) 2017-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -42,9 +42,9 @@ class SmallRandomBatchNormalizationLayerDataset final : public BatchNormalizatio public: SmallRandomBatchNormalizationLayerDataset() { - add_config(TensorShape(15U, 16U, 2U, 12U), TensorShape(2U), 0.1f); + add_config(TensorShape(1U, 16U, 2U, 12U), TensorShape(2U), 0.1f); add_config(TensorShape(21U, 11U, 12U, 7U), TensorShape(12U), 0.1f); - add_config(TensorShape(7U, 3U, 6U, 11U), TensorShape(6U), 0.1f); + add_config(TensorShape(32U, 3U, 6U, 11U), TensorShape(6U), 0.1f); } }; class LargeRandomBatchNormalizationLayerDataset final : public BatchNormalizationLayerDataset diff --git a/tests/datasets/ShapeDatasets.h b/tests/datasets/ShapeDatasets.h index a7f1a44286..558b37af33 100644 --- a/tests/datasets/ShapeDatasets.h +++ b/tests/datasets/ShapeDatasets.h @@ -839,7 +839,7 @@ public: SoftmaxLayerSmallShapes() : ShapeDataset("Shape", { - TensorShape{ 9U, 9U }, + TensorShape{ 1U, 9U }, TensorShape{ 256U, 10U }, TensorShape{ 353U, 8U }, TensorShape{ 781U, 5U }, diff --git a/tests/validation/CL/DepthwiseConvolutionLayerNative.cpp b/tests/validation/CL/DepthwiseConvolutionLayerNative.cpp index 6b917d8962..f640ee2b18 100644 --- a/tests/validation/CL/DepthwiseConvolutionLayerNative.cpp +++ b/tests/validation/CL/DepthwiseConvolutionLayerNative.cpp @@ -30,7 +30,6 @@ #include "tests/CL/CLAccessor.h" #include "tests/CL/Helper.h" #include "tests/PaddingCalculator.h" -#include "tests/datasets/ShapeDatasets.h" #include "tests/framework/Asserts.h" #include "tests/framework/Macros.h" #include "tests/framework/datasets/Datasets.h" diff --git a/tests/validation/Validation.h b/tests/validation/Validation.h index c2df1c31c0..a75562bac2 100644 --- a/tests/validation/Validation.h +++ b/tests/validation/Validation.h @@ -157,11 +157,15 @@ bool compare_dimensions(const Dimensions<T> &dimensions1, const Dimensions<T> &d } else { - // In case a 2D shape becomes 3D after permutation, the permuted tensor will have one dimension more and the first value will be 1 - if((dimensions1.num_dimensions() != dimensions2.num_dimensions()) && ((dimensions1.num_dimensions() != (dimensions2.num_dimensions() + 1)) || (dimensions1.x() != 1))) + // In case a 1D/2D shape becomes 3D after permutation, the permuted tensor will have two/one dimension(s) more and the first (two) value(s) will be 1 + // clang-format off + if((dimensions1.num_dimensions() != dimensions2.num_dimensions()) && + ((dimensions1.num_dimensions() != (dimensions2.num_dimensions() + 1)) || (dimensions1.x() != 1)) && + ((dimensions1.num_dimensions() != (dimensions2.num_dimensions() + 2)) || (dimensions1.x() != 1) || (dimensions1.y() != 1))) { return false; } + // clang-format on if((dimensions1[0] != dimensions2[2]) || (dimensions1[1] != dimensions2[0]) || (dimensions1[2] != dimensions2[1])) { |