aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/CL/ActivationLayer.cpp
diff options
context:
space:
mode:
authorGiorgio Arena <giorgio.arena@arm.com>2017-11-29 17:33:59 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:41:58 +0000
commit2995f5b6449f041d93a0e0cfb9f516ba957e3c40 (patch)
treec8ec78856f5d4a43838965b2b29c0746a7bb479b /tests/validation/CL/ActivationLayer.cpp
parent0162436565106e835e04c47d4a4e29a02ec1e351 (diff)
downloadComputeLibrary-2995f5b6449f041d93a0e0cfb9f516ba957e3c40.tar.gz
COMPMID-617 Add validation window to CLActivationLayer
Change-Id: I56e0655a2f3448691cfd7bef6911d7959da12fdd Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/111186 Tested-by: BSG Visual Compute Jenkins server to access repositories on http://mpd-gerrit.cambridge.arm.com <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'tests/validation/CL/ActivationLayer.cpp')
-rw-r--r--tests/validation/CL/ActivationLayer.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/tests/validation/CL/ActivationLayer.cpp b/tests/validation/CL/ActivationLayer.cpp
index becfb847e6..6ebbb57f87 100644
--- a/tests/validation/CL/ActivationLayer.cpp
+++ b/tests/validation/CL/ActivationLayer.cpp
@@ -160,33 +160,39 @@ DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(combine(conca
// clang-format off
DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(
framework::dataset::make("InputInfo", { TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Mismatching data types
- TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32),
- TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::QASYMM8),
+ TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Window shrink
+ TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32),
+ TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QASYMM8),
TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::QASYMM8), // Unsupported activation
TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Mismatching shapes
TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::QS8, 2), // Mismatching fixed point
- TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::QS8, 2),
+ TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QS8, 2),
+ TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QS8, 2),
}),
framework::dataset::make("OutputInfo",{ TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F16),
TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32),
- TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::QASYMM8),
+ TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32),
+ TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QASYMM8),
TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::QASYMM8),
TensorInfo(TensorShape(30U, 11U, 2U), 1, DataType::F32),
TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::QS8, 3),
- TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::QS8, 2),
+ TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QS8, 2),
+ TensorInfo(),
})),
framework::dataset::make("ActivationInfo", { ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU),
ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU),
+ ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU),
ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LU_BOUNDED_RELU),
ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU),
ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU),
ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU),
ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU),
+ ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU),
})),
- framework::dataset::make("Expected", { true, false, false, true, true, true, false })),
+ framework::dataset::make("Expected", { true, true, false, false, true, true, true, false, false })),
input_info, output_info, act_info, expected)
{
- ARM_COMPUTE_EXPECT(bool(CLActivationLayer::validate(&input_info, &output_info, act_info)) == expected, framework::LogLevel::ERRORS);
+ ARM_COMPUTE_EXPECT(bool(CLActivationLayer::validate(&input_info.clone()->set_is_resizable(false), (output_info.total_size() == 0) ? nullptr : &output_info.clone()->set_is_resizable(false), act_info)) == expected, framework::LogLevel::ERRORS);
}
// clang-format on
// *INDENT-ON*