From 3f217ec4ff11e20fe686beb9a28d0bbd80a56cd6 Mon Sep 17 00:00:00 2001 From: Isabella Gottardi Date: Mon, 12 Feb 2018 14:59:19 +0000 Subject: COMPMID-908 - Merge Activation layer with Convolution Layer (NEON. CL, GLES) Change-Id: Iab06d0768ecf805b841e601185608aae88cf9166 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/120874 Tested-by: Jenkins Reviewed-by: Anthony Barbier --- tests/validation/GLES_COMPUTE/ConvolutionLayer.cpp | 28 +++++++++++++++------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'tests/validation/GLES_COMPUTE/ConvolutionLayer.cpp') diff --git a/tests/validation/GLES_COMPUTE/ConvolutionLayer.cpp b/tests/validation/GLES_COMPUTE/ConvolutionLayer.cpp index aaa0d159be..8808d82d34 100644 --- a/tests/validation/GLES_COMPUTE/ConvolutionLayer.cpp +++ b/tests/validation/GLES_COMPUTE/ConvolutionLayer.cpp @@ -53,13 +53,21 @@ const auto CNNDataTypes = framework::dataset::make("DataType", DataType::F16, // DataType::F32, }); +const auto ActivationFunctionsDataset = framework::dataset::make("ActivationInfo", +{ + ActivationLayerInfo(), + ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), + ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::BOUNDED_RELU, 0.5f) +}); } // namespace TEST_SUITE(GC) TEST_SUITE(ConvolutionLayer) -DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(framework::dataset::concat(datasets::SmallConvolutionLayerDataset(), datasets::LargeConvolutionLayerDataset()), CNNDataTypes), - input_shape, weights_shape, bias_shape, output_shape, info, dilation, data_type) +DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(combine(framework::dataset::concat(datasets::SmallConvolutionLayerDataset(), datasets::LargeConvolutionLayerDataset()), + CNNDataTypes), + ActivationFunctionsDataset), + input_shape, weights_shape, bias_shape, output_shape, info, dilation, data_type, act_info) { // Set fixed point position data type allowed int fixed_point_position = is_data_type_fixed_point(data_type) ? 3 : 0; @@ -82,7 +90,7 @@ DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(framework::da // Create and configure function GCConvolutionLayer conv; - conv.configure(&src, &weights, &bias, &dst, info, WeightsInfo(), dilation); + conv.configure(&src, &weights, &bias, &dst, info, WeightsInfo(), dilation, act_info); // Validate valid region const ValidRegion src_valid_region = shape_to_valid_region(input_shape); @@ -108,18 +116,20 @@ using GCConvolutionLayerFixture = ConvolutionValidationFixture, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::SmallConvolutionLayerDataset(), +FIXTURE_DATA_TEST_CASE(RunSmall, GCConvolutionLayerFixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::SmallConvolutionLayerDataset(), framework::dataset::make("ReshapeWeights", { true, false })), - framework::dataset::make("DataType", - DataType::F16))) + framework::dataset::make("DataType", + DataType::F16)), + ActivationFunctionsDataset)) { // Validate output validate(GCAccessor(_target), _reference, tolerance_f16, tolerance_num); } -FIXTURE_DATA_TEST_CASE(RunLarge, GCConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, combine(combine(datasets::LargeConvolutionLayerDataset(), +FIXTURE_DATA_TEST_CASE(RunLarge, GCConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeConvolutionLayerDataset(), framework::dataset::make("ReshapeWeights", { true, false })), - framework::dataset::make("DataType", - DataType::F16))) + framework::dataset::make("DataType", + DataType::F16)), + ActivationFunctionsDataset)) { // Validate output validate(GCAccessor(_target), _reference, tolerance_f16, tolerance_num); -- cgit v1.2.1