diff options
author | Michalis Spyrou <michalis.spyrou@arm.com> | 2019-01-09 14:21:03 +0000 |
---|---|---|
committer | Michalis Spyrou <michalis.spyrou@arm.com> | 2019-01-11 12:32:03 +0000 |
commit | aeebe4ad332bc6dd4797243b39ec6000975429c5 (patch) | |
tree | 68866e55aa29ad860ee9d222869b4add2551619b /tests/validation/NEON/YOLOLayer.cpp | |
parent | ee7c15d8a57b6e1a0a98edf2bb4693024d9c15dd (diff) | |
download | ComputeLibrary-aeebe4ad332bc6dd4797243b39ec6000975429c5.tar.gz |
COMPMID-1652 NEON Cleanup and add missing tests
Change-Id: I7b351f18a78ed8a250bf3a91ef320db61984146a
Reviewed-on: https://review.mlplatform.org/485
Reviewed-by: Isabella Gottardi <isabella.gottardi@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Diffstat (limited to 'tests/validation/NEON/YOLOLayer.cpp')
-rw-r--r-- | tests/validation/NEON/YOLOLayer.cpp | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/tests/validation/NEON/YOLOLayer.cpp b/tests/validation/NEON/YOLOLayer.cpp index 6225dc170e..0edbc4e11f 100644 --- a/tests/validation/NEON/YOLOLayer.cpp +++ b/tests/validation/NEON/YOLOLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 ARM Limited. + * Copyright (c) 2018-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -60,6 +60,46 @@ const auto YOLODataset = combine(combine(combine(combine(framework::dataset::mak TEST_SUITE(NEON) TEST_SUITE(YOLOLayer) +// *INDENT-OFF* +// clang-format off +DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip( + framework::dataset::make("InputInfo", { TensorInfo(TensorShape(16U, 16U, 6U), 1, DataType::U8), // Wrong input data type + TensorInfo(TensorShape(16U, 16U, 6U), 1, DataType::F32), // Invalid activation info + TensorInfo(TensorShape(16U, 16U, 6U), 1, DataType::F32), // Wrong output data type + TensorInfo(TensorShape(16U, 16U, 6U), 1, DataType::F32), // wrong number of classes + TensorInfo(TensorShape(16U, 16U, 6U), 1, DataType::F32), // Mismatching shapes + TensorInfo(TensorShape(17U, 16U, 6U), 1, DataType::F32), // shrink window + TensorInfo(TensorShape(17U, 16U, 7U), 1, DataType::F32), // channels not multiple of (num_classes + 5) + TensorInfo(TensorShape(16U, 16U, 6U), 1, DataType::F32), // Valid + }), + framework::dataset::make("OutputInfo",{ TensorInfo(TensorShape(16U, 16U, 6U), 1, DataType::F32), + TensorInfo(TensorShape(16U, 16U, 6U), 1, DataType::F32), + TensorInfo(TensorShape(16U, 16U, 6U), 1, DataType::U16), + TensorInfo(TensorShape(16U, 16U, 6U), 1, DataType::F32), + TensorInfo(TensorShape(16U, 11U, 6U), 1, DataType::F32), + TensorInfo(TensorShape(16U, 16U, 6U), 1, DataType::F32), + TensorInfo(TensorShape(16U, 16U, 7U), 1, DataType::F32), + TensorInfo(TensorShape(16U, 16U, 6U), 1, DataType::F32), + })), + framework::dataset::make("ActivationInfo", { ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LOGISTIC), + ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), + ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LOGISTIC), + ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LOGISTIC), + ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LOGISTIC), + ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LOGISTIC), + ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LOGISTIC), + ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LOGISTIC), + })), + framework::dataset::make("Numclasses", { 1, 1, 1, 0, 1, 1, 1, 1 + })), + framework::dataset::make("Expected", { false, false, false, false, false, false, false, true})), + input_info, output_info, act_info, num_classes, expected) +{ + ARM_COMPUTE_EXPECT(bool(NEYOLOLayer::validate(&input_info.clone()->set_is_resizable(false), &output_info.clone()->set_is_resizable(false), act_info, num_classes)) == expected, framework::LogLevel::ERRORS); +} +// clang-format on +// *INDENT-ON* + template <typename T> using NEYOLOLayerFixture = YOLOValidationFixture<Tensor, Accessor, NEYOLOLayer, T>; |