aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/CL/SoftmaxLayer.cpp
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2017-11-14 15:32:57 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commit30902ed3befd225cb3a6915223d0941949b8d265 (patch)
tree6f701094ae52e8e4dc41b993febbff404e660c82 /tests/validation/CL/SoftmaxLayer.cpp
parent77f0f879f8a9371e50fb1c5b2b5f7252b839883c (diff)
downloadComputeLibrary-30902ed3befd225cb3a6915223d0941949b8d265.tar.gz
COMPMID-617: Add validation methods to ML CL functions.
Adds validation support to: - CLDirectConvolution - CLNormalizationLayer - CLSoftmaxLayer Change-Id: I9bd1e925e6db057c799169405f82ed21d20b87ee Reviewed-on: http://mpd-gerrit.cambridge.arm.com/95939 Reviewed-by: Anthony Barbier <anthony.barbier@arm.com> Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'tests/validation/CL/SoftmaxLayer.cpp')
-rw-r--r--tests/validation/CL/SoftmaxLayer.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/validation/CL/SoftmaxLayer.cpp b/tests/validation/CL/SoftmaxLayer.cpp
index a06aa7bbca..b935ef55a0 100644
--- a/tests/validation/CL/SoftmaxLayer.cpp
+++ b/tests/validation/CL/SoftmaxLayer.cpp
@@ -110,6 +110,37 @@ DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(concat(datase
validate(dst.info()->padding(), padding_dst);
}
+// *INDENT-OFF*
+// clang-format off
+DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, 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), // Mismatching shapes
+ TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::QS8, 2), // Mismatching fixed point
+ TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::QASYMM8, // Invalid output quantization info
+ QuantizationInfo(1.f/256, 12)),
+ TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32),
+ TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::QS8, 3),
+ TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::QASYMM8,
+ QuantizationInfo(1.f/256, 12)),
+ }),
+ framework::dataset::make("OutputInfo",{ TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F16),
+ TensorInfo(TensorShape(27U, 11U, 2U), 1, DataType::F32),
+ TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::QS8, 3),
+ TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::QASYMM8,
+ QuantizationInfo(1.f/256, 12)),
+ TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32),
+ TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::QS8, 3),
+ TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::QASYMM8,
+ QuantizationInfo(1.f/256, 0)),
+ })),
+ framework::dataset::make("Expected", { true, true, true, true, false, false, false })),
+ input_info, output_info, expected)
+{
+ ARM_COMPUTE_EXPECT(bool(CLSoftmaxLayer::validate(&input_info, &output_info)) == expected, framework::LogLevel::ERRORS);
+}
+// clang-format on
+// *INDENT-ON*
+
template <typename T>
using CLSoftmaxLayerFixture = SoftmaxValidationFixture<CLTensor, CLAccessor, CLSoftmaxLayer, T>;