diff options
author | Isabella Gottardi <isabella.gottardi@arm.com> | 2018-02-12 14:59:19 +0000 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:49:16 +0000 |
commit | 3f217ec4ff11e20fe686beb9a28d0bbd80a56cd6 (patch) | |
tree | 81db8baab925af5b416b66d0328be2eb49543824 /tests/validation/GLES_COMPUTE/ConvolutionLayer.cpp | |
parent | d9eb27597eabe5b7c17520f4f9b3f8a282d72573 (diff) | |
download | ComputeLibrary-3f217ec4ff11e20fe686beb9a28d0bbd80a56cd6.tar.gz |
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 <bsgcomp@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'tests/validation/GLES_COMPUTE/ConvolutionLayer.cpp')
-rw-r--r-- | tests/validation/GLES_COMPUTE/ConvolutionLayer.cpp | 28 |
1 files changed, 19 insertions, 9 deletions
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<GCTensor, GCAcces TEST_SUITE(Float) TEST_SUITE(FP16) -FIXTURE_DATA_TEST_CASE(RunSmall, GCConvolutionLayerFixture<half>, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::SmallConvolutionLayerDataset(), +FIXTURE_DATA_TEST_CASE(RunSmall, GCConvolutionLayerFixture<half>, 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<half>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::LargeConvolutionLayerDataset(), +FIXTURE_DATA_TEST_CASE(RunLarge, GCConvolutionLayerFixture<half>, 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); |