From ced7a8d0b4fe77d750a1e55883d5886ad9760f3b Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Thu, 1 Feb 2018 16:31:33 +0000 Subject: COMPMID-875: Deconvolution 4x4 not working -Enforces the use of the ConvolutionLayer function in the DeconvolutionLayer. -Adds tests for 4x4 Deconvolution. -Alters the ConvolutionLayer validation to support even kernels. Change-Id: Id27e285f078e690b8dd58490dd8ea6d875b3cec6 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/118632 Tested-by: Jenkins Reviewed-by: Anthony Barbier --- tests/validation/CL/DeconvolutionLayer.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'tests/validation/CL/DeconvolutionLayer.cpp') diff --git a/tests/validation/CL/DeconvolutionLayer.cpp b/tests/validation/CL/DeconvolutionLayer.cpp index 59e85537e5..58a20268ef 100644 --- a/tests/validation/CL/DeconvolutionLayer.cpp +++ b/tests/validation/CL/DeconvolutionLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2018 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -45,6 +45,9 @@ namespace { constexpr AbsoluteTolerance tolerance_fp32(0.001f); /**< Tolerance for floating point tests */ +const auto data4x4 = datasets::SmallDeconvolutionShapes() * framework::dataset::make("StrideX", 1, 4) * framework::dataset::make("StrideY", 1, 4) * framework::dataset::make("PadX", 0, 3) + * framework::dataset::make("PadY", 0, 3) * framework::dataset::make("ax", 0) * framework::dataset::make("ay", 0) * framework::dataset::make("NumKernels", { 1, 3 }); + const auto data3x3 = datasets::SmallDeconvolutionShapes() * framework::dataset::make("StrideX", 1, 4) * framework::dataset::make("StrideY", 1, 4) * framework::dataset::make("PadX", 0, 2) * framework::dataset::make("PadY", 0, 2) * framework::dataset::make("ax", 0) * framework::dataset::make("ay", 0) * framework::dataset::make("NumKernels", { 1, 3 }); @@ -156,6 +159,9 @@ DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(zip(zi // clang-format on // *INDENT-ON* +template +using CLDeconvolutionLayerFixture4x4 = DeconvolutionValidationFixture; + template using CLDeconvolutionLayerFixture3x3 = DeconvolutionValidationFixture; @@ -165,6 +171,15 @@ using CLDeconvolutionLayerFixture1x1 = DeconvolutionValidationFixture, framework::DatasetMode::ALL, combine(data4x4, framework::dataset::make("DataType", DataType::F32))) +{ + // Validate output + validate(CLAccessor(_target), _reference, tolerance_fp32); +} +TEST_SUITE_END() + TEST_SUITE(W3x3) FIXTURE_DATA_TEST_CASE(Run, CLDeconvolutionLayerFixture3x3, framework::DatasetMode::ALL, combine(data3x3, framework::dataset::make("DataType", DataType::F32))) -- cgit v1.2.1