Sanghoon Lee | 9688378 | 2017-09-15 14:10:48 +0100 | [diff] [blame] | 1 | /* |
Michalis Spyrou | d175ece | 2020-07-30 23:39:32 +0100 | [diff] [blame] | 2 | * Copyright (c) 2017-2020 Arm Limited. |
Sanghoon Lee | 9688378 | 2017-09-15 14:10:48 +0100 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: MIT |
| 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 7 | * of this software and associated documentation files (the "Software"), to |
| 8 | * deal in the Software without restriction, including without limitation the |
| 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
| 10 | * sell copies of the Software, and to permit persons to whom the Software is |
| 11 | * furnished to do so, subject to the following conditions: |
| 12 | * |
| 13 | * The above copyright notice and this permission notice shall be included in all |
| 14 | * copies or substantial portions of the Software. |
| 15 | * |
| 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 22 | * SOFTWARE. |
| 23 | */ |
| 24 | #include "arm_compute/core/Types.h" |
| 25 | #include "arm_compute/runtime/CL/CLTensor.h" |
| 26 | #include "arm_compute/runtime/CL/CLTensorAllocator.h" |
| 27 | #include "arm_compute/runtime/CL/functions/CLBatchNormalizationLayer.h" |
Georgios Pinitas | c936917 | 2018-09-26 11:25:40 +0100 | [diff] [blame] | 28 | #include "arm_compute/runtime/CL/functions/CLConvolutionLayer.h" |
| 29 | #include "arm_compute/runtime/CL/functions/CLFuseBatchNormalization.h" |
Sanghoon Lee | 9688378 | 2017-09-15 14:10:48 +0100 | [diff] [blame] | 30 | #include "tests/CL/CLAccessor.h" |
| 31 | #include "tests/PaddingCalculator.h" |
Georgios Pinitas | c936917 | 2018-09-26 11:25:40 +0100 | [diff] [blame] | 32 | #include "tests/datasets/LargeConvolutionLayerDataset.h" |
Sanghoon Lee | 9688378 | 2017-09-15 14:10:48 +0100 | [diff] [blame] | 33 | #include "tests/datasets/RandomBatchNormalizationLayerDataset.h" |
Georgios Pinitas | c936917 | 2018-09-26 11:25:40 +0100 | [diff] [blame] | 34 | #include "tests/datasets/SmallConvolutionLayerDataset.h" |
Sanghoon Lee | 9688378 | 2017-09-15 14:10:48 +0100 | [diff] [blame] | 35 | #include "tests/framework/Asserts.h" |
| 36 | #include "tests/framework/Macros.h" |
| 37 | #include "tests/framework/datasets/Datasets.h" |
Michele Di Giorgio | 0cbb927 | 2018-03-01 16:56:48 +0000 | [diff] [blame] | 38 | #include "tests/validation/Helpers.h" |
Sanghoon Lee | 9688378 | 2017-09-15 14:10:48 +0100 | [diff] [blame] | 39 | #include "tests/validation/Validation.h" |
| 40 | #include "tests/validation/fixtures/BatchNormalizationLayerFixture.h" |
Georgios Pinitas | c936917 | 2018-09-26 11:25:40 +0100 | [diff] [blame] | 41 | #include "tests/validation/fixtures/BatchNormalizationLayerFusionFixture.h" |
Sanghoon Lee | 9688378 | 2017-09-15 14:10:48 +0100 | [diff] [blame] | 42 | |
| 43 | namespace arm_compute |
| 44 | { |
| 45 | namespace test |
| 46 | { |
| 47 | namespace validation |
| 48 | { |
| 49 | namespace |
| 50 | { |
Georgios Pinitas | 51e53a3 | 2018-10-22 13:49:08 +0100 | [diff] [blame] | 51 | RelativeTolerance<float> rel_tolerance_f32(0.05f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F32 */ |
| 52 | constexpr AbsoluteTolerance<float> abs_tolerance_f32(0.0001f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F32 */ |
| 53 | constexpr AbsoluteTolerance<float> tolerance_f16(0.01f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F16 */ |
Giorgio Arena | 1167487 | 2018-02-07 15:38:12 +0000 | [diff] [blame] | 54 | const auto act_infos = framework::dataset::make("ActivationInfo", |
| 55 | { |
| 56 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), |
| 57 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::BOUNDED_RELU, 6.f), |
| 58 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LU_BOUNDED_RELU, 8.f, 2.f), |
| 59 | }); |
Georgios Pinitas | c936917 | 2018-09-26 11:25:40 +0100 | [diff] [blame] | 60 | |
| 61 | const auto common_fusion_dataset = combine(combine(combine(framework::dataset::make("UseBias", { false, true }), |
| 62 | framework::dataset::make("UseBeta", { false, true })), |
| 63 | framework::dataset::make("UseGamma", { false, true })), |
| 64 | framework::dataset::make("Epsilon", { 0.001f })); |
Sheri Zhang | 141c31a | 2020-10-08 12:35:28 +0100 | [diff] [blame] | 65 | |
| 66 | bool validate_zero_padding(TensorShape shape0, const TensorShape shape1, float epsilon, ActivationLayerInfo act_info, DataType dt, DataLayout data_layout) |
| 67 | { |
| 68 | if(data_layout == DataLayout::NHWC) |
| 69 | { |
| 70 | permute(shape0, PermutationVector(2U, 0U, 1U)); |
| 71 | } |
| 72 | |
| 73 | // Create tensors |
| 74 | CLTensor src = create_tensor<CLTensor>(shape0, dt, 1, QuantizationInfo(), data_layout); |
| 75 | CLTensor dst = create_tensor<CLTensor>(shape0, dt, 1, QuantizationInfo(), data_layout); |
| 76 | CLTensor mean = create_tensor<CLTensor>(shape1, dt, 1); |
| 77 | CLTensor var = create_tensor<CLTensor>(shape1, dt, 1); |
| 78 | CLTensor beta = create_tensor<CLTensor>(shape1, dt, 1); |
| 79 | CLTensor gamma = create_tensor<CLTensor>(shape1, dt, 1); |
| 80 | |
| 81 | // Create and configure function |
| 82 | CLBatchNormalizationLayer norm; |
| 83 | norm.configure(&src, &dst, &mean, &var, &beta, &gamma, epsilon, act_info); |
| 84 | |
| 85 | return src.info()->padding().empty() && dst.info()->padding().empty() && mean.info()->padding().empty() && var.info()->padding().empty() && beta.info()->padding().empty() |
| 86 | && gamma.info()->padding().empty(); |
| 87 | } |
Sanghoon Lee | 9688378 | 2017-09-15 14:10:48 +0100 | [diff] [blame] | 88 | } // namespace |
| 89 | |
| 90 | TEST_SUITE(CL) |
| 91 | TEST_SUITE(BatchNormalizationLayer) |
| 92 | |
| 93 | template <typename T> |
| 94 | using CLBatchNormalizationLayerFixture = BatchNormalizationLayerValidationFixture<CLTensor, CLAccessor, CLBatchNormalizationLayer, T>; |
| 95 | |
Georgios Pinitas | f9d3a0a | 2017-11-03 19:01:44 +0000 | [diff] [blame] | 96 | // *INDENT-OFF* |
| 97 | // clang-format off |
Giorgio Arena | 1167487 | 2018-02-07 15:38:12 +0000 | [diff] [blame] | 98 | DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip( |
Giorgio Arena | 7062382 | 2017-11-27 15:50:10 +0000 | [diff] [blame] | 99 | framework::dataset::make("InputInfo", { TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), |
| 100 | TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Window shrink |
| 101 | TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), // Mismatching data types |
| 102 | TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), // Mismatching data types |
| 103 | TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), // Invalid mean/var/beta/gamma shape |
Giorgio Arena | 1167487 | 2018-02-07 15:38:12 +0000 | [diff] [blame] | 104 | TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), // Unsupported fused activation |
| 105 | TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), // Fused activation's a < b |
Georgios Pinitas | f9d3a0a | 2017-11-03 19:01:44 +0000 | [diff] [blame] | 106 | }), |
Giorgio Arena | 7062382 | 2017-11-27 15:50:10 +0000 | [diff] [blame] | 107 | framework::dataset::make("OutputInfo",{ TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), |
Georgios Pinitas | f9d3a0a | 2017-11-03 19:01:44 +0000 | [diff] [blame] | 108 | TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), |
Giorgio Arena | 7062382 | 2017-11-27 15:50:10 +0000 | [diff] [blame] | 109 | TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), |
| 110 | TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F16), |
| 111 | TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), |
Giorgio Arena | 1167487 | 2018-02-07 15:38:12 +0000 | [diff] [blame] | 112 | TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), |
| 113 | TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), |
Georgios Pinitas | f9d3a0a | 2017-11-03 19:01:44 +0000 | [diff] [blame] | 114 | })), |
| 115 | framework::dataset::make("MVBGInfo",{ TensorInfo(TensorShape(2U), 1, DataType::F32), |
Giorgio Arena | 7062382 | 2017-11-27 15:50:10 +0000 | [diff] [blame] | 116 | TensorInfo(TensorShape(2U), 1, DataType::F32), |
Georgios Pinitas | f9d3a0a | 2017-11-03 19:01:44 +0000 | [diff] [blame] | 117 | TensorInfo(TensorShape(2U), 1, DataType::F16), |
| 118 | TensorInfo(TensorShape(2U), 1, DataType::F32), |
| 119 | TensorInfo(TensorShape(5U), 1, DataType::F32), |
Giorgio Arena | 1167487 | 2018-02-07 15:38:12 +0000 | [diff] [blame] | 120 | TensorInfo(TensorShape(2U), 1, DataType::F32), |
| 121 | TensorInfo(TensorShape(2U), 1, DataType::F32), |
Georgios Pinitas | f9d3a0a | 2017-11-03 19:01:44 +0000 | [diff] [blame] | 122 | })), |
Giorgio Arena | 1167487 | 2018-02-07 15:38:12 +0000 | [diff] [blame] | 123 | framework::dataset::make("ActivationLayerInfo",{ ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), |
| 124 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), |
| 125 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::BOUNDED_RELU, 6.f), |
| 126 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::BOUNDED_RELU, 6.f), |
| 127 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LU_BOUNDED_RELU, 6.f), |
Giorgio Arena | 1167487 | 2018-02-07 15:38:12 +0000 | [diff] [blame] | 128 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::TANH), |
| 129 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LU_BOUNDED_RELU, 2.f, 6.f), |
Giorgio Arena | 1167487 | 2018-02-07 15:38:12 +0000 | [diff] [blame] | 130 | })), |
Vidhya Sudhan Loganathan | 0fc2545 | 2018-06-18 14:40:56 +0100 | [diff] [blame] | 131 | framework::dataset::make("Expected", { true, false, false, false, false, false, false})), |
Giorgio Arena | 1167487 | 2018-02-07 15:38:12 +0000 | [diff] [blame] | 132 | input_info, output_info, mvbg_info, act_info, expected) |
Georgios Pinitas | f9d3a0a | 2017-11-03 19:01:44 +0000 | [diff] [blame] | 133 | { |
Giorgio Arena | 7062382 | 2017-11-27 15:50:10 +0000 | [diff] [blame] | 134 | const auto &mean_info = mvbg_info; |
| 135 | const auto &var_info = mvbg_info; |
| 136 | const auto &beta_info = mvbg_info; |
| 137 | const auto &gamma_info = mvbg_info; |
Giorgio Arena | 1167487 | 2018-02-07 15:38:12 +0000 | [diff] [blame] | 138 | bool has_error = bool(CLBatchNormalizationLayer::validate(&input_info.clone()->set_is_resizable(false), (output_info.total_size() == 0) ? nullptr : &output_info.clone()->set_is_resizable(false), &mean_info.clone()->set_is_resizable(false), &var_info.clone()->set_is_resizable(false), &beta_info.clone()->set_is_resizable(false), &gamma_info.clone()->set_is_resizable(false), 1.f, act_info)); |
Georgios Pinitas | f9d3a0a | 2017-11-03 19:01:44 +0000 | [diff] [blame] | 139 | ARM_COMPUTE_EXPECT(has_error == expected, framework::LogLevel::ERRORS); |
| 140 | } |
| 141 | // clang-format on |
| 142 | // *INDENT-ON* |
| 143 | |
Sheri Zhang | 141c31a | 2020-10-08 12:35:28 +0100 | [diff] [blame] | 144 | DATA_TEST_CASE(ValidateZeroPadding, framework::DatasetMode::ALL, combine(combine(combine(datasets::SmallRandomBatchNormalizationLayerDataset(), |
| 145 | act_infos), |
| 146 | framework::dataset::make("DataType", { DataType::F32, DataType::F16 })), |
| 147 | framework::dataset::make("DataLayout", { DataLayout::NHWC })), |
| 148 | shape0, shape1, episilon, act_infos, data_type, data_layout) |
| 149 | { |
| 150 | bool status = validate_zero_padding(shape0, shape1, episilon, act_infos, data_type, data_layout); |
| 151 | ARM_COMPUTE_EXPECT(status, framework::LogLevel::ERRORS); |
| 152 | } |
| 153 | |
Sanghoon Lee | 9688378 | 2017-09-15 14:10:48 +0100 | [diff] [blame] | 154 | TEST_SUITE(Float) |
Gian Marco Iodice | 349feef | 2017-09-28 11:21:29 +0100 | [diff] [blame] | 155 | TEST_SUITE(FP32) |
Michalis Spyrou | aeebe4a | 2019-01-09 14:21:03 +0000 | [diff] [blame] | 156 | FIXTURE_DATA_TEST_CASE(Random, CLBatchNormalizationLayerFixture<float>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(datasets::SmallRandomBatchNormalizationLayerDataset(), |
Michele Di Giorgio | 4d33630 | 2018-03-02 09:43:54 +0000 | [diff] [blame] | 157 | combine(framework::dataset::make("UseBeta", { false, true }), |
| 158 | framework::dataset::make("UseGamma", { false, true }))), |
Giorgio Arena | 1167487 | 2018-02-07 15:38:12 +0000 | [diff] [blame] | 159 | act_infos), |
Michele Di Giorgio | 0cbb927 | 2018-03-01 16:56:48 +0000 | [diff] [blame] | 160 | framework::dataset::make("DataType", DataType::F32)), |
Michele Di Giorgio | bf3c662 | 2018-03-08 11:52:27 +0000 | [diff] [blame] | 161 | framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC }))) |
Sanghoon Lee | 9688378 | 2017-09-15 14:10:48 +0100 | [diff] [blame] | 162 | { |
| 163 | // Validate output |
Georgios Pinitas | c936917 | 2018-09-26 11:25:40 +0100 | [diff] [blame] | 164 | validate(CLAccessor(_target), _reference, abs_tolerance_f32, 0); |
Sanghoon Lee | 9688378 | 2017-09-15 14:10:48 +0100 | [diff] [blame] | 165 | } |
Georgios Pinitas | c936917 | 2018-09-26 11:25:40 +0100 | [diff] [blame] | 166 | TEST_SUITE_END() //FP32 |
Sanghoon Lee | 9688378 | 2017-09-15 14:10:48 +0100 | [diff] [blame] | 167 | |
Gian Marco Iodice | 349feef | 2017-09-28 11:21:29 +0100 | [diff] [blame] | 168 | TEST_SUITE(FP16) |
Michalis Spyrou | aeebe4a | 2019-01-09 14:21:03 +0000 | [diff] [blame] | 169 | FIXTURE_DATA_TEST_CASE(Random, CLBatchNormalizationLayerFixture<half>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(datasets::SmallRandomBatchNormalizationLayerDataset(), |
Michele Di Giorgio | 4d33630 | 2018-03-02 09:43:54 +0000 | [diff] [blame] | 170 | combine(framework::dataset::make("UseBeta", { false, true }), |
| 171 | framework::dataset::make("UseGamma", { false, true }))), |
Giorgio Arena | 1167487 | 2018-02-07 15:38:12 +0000 | [diff] [blame] | 172 | framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::BOUNDED_RELU, 6.f))), |
Michele Di Giorgio | 0cbb927 | 2018-03-01 16:56:48 +0000 | [diff] [blame] | 173 | framework::dataset::make("DataType", DataType::F16)), |
Michele Di Giorgio | bf3c662 | 2018-03-08 11:52:27 +0000 | [diff] [blame] | 174 | framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC }))) |
Gian Marco Iodice | 349feef | 2017-09-28 11:21:29 +0100 | [diff] [blame] | 175 | { |
| 176 | // Validate output |
| 177 | validate(CLAccessor(_target), _reference, tolerance_f16, 0); |
| 178 | } |
Georgios Pinitas | c936917 | 2018-09-26 11:25:40 +0100 | [diff] [blame] | 179 | TEST_SUITE_END() // FP16 |
| 180 | TEST_SUITE_END() // Float |
Gian Marco Iodice | 349feef | 2017-09-28 11:21:29 +0100 | [diff] [blame] | 181 | |
Georgios Pinitas | c936917 | 2018-09-26 11:25:40 +0100 | [diff] [blame] | 182 | TEST_SUITE_END() // BatchNormalizationLayer |
| 183 | |
| 184 | TEST_SUITE(BatchNormalizationLayerFusion) |
Michalis Spyrou | 8094325 | 2019-01-10 17:19:50 +0000 | [diff] [blame] | 185 | // *INDENT-OFF* |
| 186 | // clang-format off |
| 187 | DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip( |
| 188 | framework::dataset::make("Weights", { TensorInfo(TensorShape(32U, 13U, 2U, 2U), 1, DataType::F32), // Valid |
| 189 | TensorInfo(TensorShape(32U, 13U, 2U, 2U), 1, DataType::F32), // Mismatching data types |
| 190 | TensorInfo(TensorShape(32U, 13U, 2U, 1U), 1, DataType::F32), // Invalid mean/var/beta/gamma shape |
| 191 | }), |
| 192 | framework::dataset::make("MVBGInfo",{ TensorInfo(TensorShape(2U), 1, DataType::F32), |
| 193 | TensorInfo(TensorShape(2U), 1, DataType::F16), |
| 194 | TensorInfo(TensorShape(5U), 1, DataType::F32), |
| 195 | })), |
| 196 | framework::dataset::make("Expected", { true, false, false})), |
| 197 | weights_info, mvbg_info, expected) |
| 198 | { |
| 199 | const auto &weights_in_info = weights_info; |
| 200 | const auto &mean_info = mvbg_info; |
| 201 | const auto &var_info = mvbg_info; |
| 202 | const auto &fused_weights_info = weights_info; |
| 203 | const auto &fused_bias_info = mvbg_info; |
| 204 | const auto &conv_bias_info = mvbg_info; |
| 205 | const auto &beta_info = mvbg_info; |
| 206 | const auto &gamma_info = mvbg_info; |
| 207 | bool has_error = bool(CLFuseBatchNormalization::validate( |
| 208 | &weights_in_info.clone()->set_is_resizable(false), &mean_info.clone()->set_is_resizable(false), |
| 209 | &var_info.clone()->set_is_resizable(false), &fused_weights_info.clone()->set_is_resizable(false), |
| 210 | &fused_bias_info.clone()->set_is_resizable(false), &conv_bias_info.clone()->set_is_resizable(false), |
| 211 | &beta_info.clone()->set_is_resizable(false), &gamma_info.clone()->set_is_resizable(false), 1.f)); |
| 212 | ARM_COMPUTE_EXPECT(has_error == expected, framework::LogLevel::ERRORS); |
| 213 | } |
| 214 | // clang-format on |
| 215 | // *INDENT-ON* |
Georgios Pinitas | c936917 | 2018-09-26 11:25:40 +0100 | [diff] [blame] | 216 | template <typename T> |
| 217 | using CLBatchNormalizationLayerFusionFixture = BatchNormalizationLayerFusionValidationFixture<CLTensor, CLAccessor, CLConvolutionLayer, CLFuseBatchNormalization, T>; |
| 218 | |
| 219 | TEST_SUITE(Float) |
| 220 | TEST_SUITE(FP32) |
| 221 | FIXTURE_DATA_TEST_CASE(RunSmall, CLBatchNormalizationLayerFusionFixture<float>, framework::DatasetMode::PRECOMMIT, |
Michalis Spyrou | 8094325 | 2019-01-10 17:19:50 +0000 | [diff] [blame] | 222 | combine(combine(combine(datasets::SmallConvolutionLayerReducedDataset(), common_fusion_dataset), |
| 223 | framework::dataset::make("DataType", DataType::F32)), |
| 224 | framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC }))) |
| 225 | { |
| 226 | // Validate output |
| 227 | validate(CLAccessor(_target), _reference, rel_tolerance_f32, 0.f, abs_tolerance_f32); |
| 228 | } |
| 229 | FIXTURE_DATA_TEST_CASE(RunLarge, CLBatchNormalizationLayerFusionFixture<float>, framework::DatasetMode::NIGHTLY, |
Georgios Pinitas | c936917 | 2018-09-26 11:25:40 +0100 | [diff] [blame] | 230 | combine(combine(combine(datasets::SmallConvolutionLayerDataset(), common_fusion_dataset), |
| 231 | framework::dataset::make("DataType", DataType::F32)), |
| 232 | framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC }))) |
| 233 | { |
| 234 | // Validate output |
| 235 | validate(CLAccessor(_target), _reference, rel_tolerance_f32, 0.f, abs_tolerance_f32); |
| 236 | } |
| 237 | TEST_SUITE_END() // FP32 |
| 238 | TEST_SUITE_END() // Float |
| 239 | |
| 240 | TEST_SUITE_END() // BatchNormalizationLayerFusion |
| 241 | TEST_SUITE_END() // CL |
Sanghoon Lee | 9688378 | 2017-09-15 14:10:48 +0100 | [diff] [blame] | 242 | } // namespace validation |
| 243 | } // namespace test |
| 244 | } // namespace arm_compute |