30 #include "tests/datasets/ConvertPolicyDataset.h" 31 #include "tests/datasets/ShapeDatasets.h" 36 #include "tests/validation/fixtures/DepthConvertLayerFixture.h" 100 template <
typename T>
102 template <
typename T>
104 template <
typename T>
106 template <
typename T>
108 template <
typename T>
114 DepthConvertLayerShiftDatasetPrecommit))
122 DepthConvertLayerShiftDatasetNightly))
132 DepthConvertLayerShiftDatasetPrecommit))
140 DepthConvertLayerShiftDatasetNightly))
149 DepthConvertLayerShiftDatasetPrecommit))
157 DepthConvertLayerShiftDatasetNightly))
167 DepthConvertLayerShiftDatasetPrecommit))
174 DepthConvertLayerShiftDatasetNightly))
184 DepthConvertLayerShiftDatasetPrecommit))
191 DepthConvertLayerShiftDatasetNightly))
201 DepthConvertLayerShiftDatasetPrecommit))
208 DepthConvertLayerShiftDatasetNightly))
218 DepthConvertLayerShiftDatasetPrecommit))
225 DepthConvertLayerShiftDatasetNightly))
DepthConvertLayerValidationFixture< CLTensor, CLAccessor, CLDepthConvertLayer, T, float > CLDepthConvertLayerToF32Fixture
1 channel, 1 U8 per channel
1 channel, 1 F32 per channel
ARM_COMPUTE_EXPECT(has_error==expected, framework::LogLevel::ERRORS)
1 channel, 1 U16 per channel
std::enable_if< is_container< T >::value, ContainerDataset< T > >::type make(std::string name, T &&values)
Helper function to create a ContainerDataset.
Copyright (c) 2017-2021 Arm Limited.
DepthConvertLayerValidationFixture< CLTensor, CLAccessor, CLDepthConvertLayer, T, uint16_t > CLDepthConvertLayerToU16Fixture
1 channel, 1 F16 per channel
1 channel, 1 S32 per channel
DepthConvertLayerValidationFixture< CLTensor, CLAccessor, CLDepthConvertLayer, T, half > CLDepthConvertLayerToF16Fixture
DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(framework::dataset::make("InputInfo", { TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), 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(27U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QSYMM16), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QSYMM16), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QSYMM16), }), framework::dataset::make("OutputInfo",{ TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F16), TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), 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(32U, 13U, 2U), 1, DataType::QSYMM16, QuantizationInfo(1.f/32768.f, 0)), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QSYMM16, QuantizationInfo(1.f/32768.f, 0)), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QSYMM16, QuantizationInfo(1.f/32768.f, 0)), })), 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::TANH), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::TANH), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LOGISTIC), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::SQRT), })), framework::dataset::make("Expected", { false, true, true, true, false, false, true, true, false })), input_info, output_info, act_info, expected)
DatasetMode
Possible dataset modes.
1 channel, 1 U32 per channel
TEST_SUITE_END() FIXTURE_DATA_TEST_CASE(RunSmall
[CLActivationLayer Test snippet]
quantized, asymmetric fixed-point 8-bit number unsigned
Accessor implementation for CLTensor objects.
TEST_SUITE(U8_to_S8) FIXTURE_DATA_TEST_CASE(RunSmall
validate(CLAccessor(output_state), expected_output)
1 channel, 1 S16 per channel
DepthConvertLayerValidationFixture< CLTensor, CLAccessor, CLDepthConvertLayer, T, uint32_t > CLDepthConvertLayerToU32Fixture
FIXTURE_DATA_TEST_CASE(RunSmall, CLAbsLayerFixture< half >, framework::DatasetMode::PRECOMMIT, combine(datasets::SmallShapes(), framework::dataset::make("DataType", DataType::F16)))
Store the tensor's metadata.
static Status validate(const ITensorInfo *input, const ITensorInfo *output, ConvertPolicy policy, uint32_t shift)
Static function to check if given info will lead to a valid configuration of CLDepthConvertLayer.
DepthConvertLayerValidationFixture< CLTensor, CLAccessor, CLDepthConvertLayer, T, uint8_t > CLDepthConvertLayerToU8Fixture
zip(zip(framework::dataset::make("Weights", { TensorInfo(TensorShape(32U, 13U, 2U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U, 1U), 1, DataType::F32), }), framework::dataset::make("MVBGInfo",{ TensorInfo(TensorShape(2U), 1, DataType::F32), TensorInfo(TensorShape(2U), 1, DataType::F16), TensorInfo(TensorShape(5U), 1, DataType::F32), })), framework::dataset::make("Expected", { true, false, false}))
DepthConvertLayerValidationFixture< CLTensor, CLAccessor, CLDepthConvertLayer, T, int32_t > CLDepthConvertLayerToS32Fixture
combine(datasets::SmallShapes(), framework::dataset::make("DataType", DataType::F32)))
ConvertPolicy
Policy to handle overflow.
DepthConvertLayerValidationFixture< CLTensor, CLAccessor, CLDepthConvertLayer, T, int16_t > CLDepthConvertLayerToS16Fixture