31 #include "tests/datasets/ShapeDatasets.h" 35 #include "tests/validation/fixtures/BoundingBoxTransformFixture.h" 46 RelativeTolerance<float> relative_tolerance_f32(0.01f);
47 AbsoluteTolerance<float> absolute_tolerance_f32(0.001f);
48 #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 49 RelativeTolerance<half> relative_tolerance_f16(
half(0.2));
50 AbsoluteTolerance<float> absolute_tolerance_f16(
half(0.02f));
51 #endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 53 constexpr AbsoluteTolerance<uint16_t> tolerance_qasymm16(1);
58 BoundingBoxTransformInfo(128U, 128U, 4U,
true),
59 BoundingBoxTransformInfo(800U, 600U, 1U,
false),
60 BoundingBoxTransformInfo(800U, 600U, 2U,
true, { { 1.0, 0.5, 1.5, 2.0 } }),
61 BoundingBoxTransformInfo(800U, 600U, 4U,
false, { { 1.0, 0.5, 1.5, 2.0 } }),
62 BoundingBoxTransformInfo(800U, 600U, 4U,
false, { { 1.0, 0.5, 1.5, 2.0 } },
true)
69 TensorShape(40U, 20U),
70 TensorShape(40U, 100U),
71 TensorShape(40U, 200U)
102 BoundingBoxTransformInfo(800.f, 600.f, 1.f),
103 BoundingBoxTransformInfo(800.f, 600.f, 1.f),
104 BoundingBoxTransformInfo(800.f, 600.f, 1.f),
105 BoundingBoxTransformInfo(800.f, 600.f, 0.f)})),
107 boxes_info, pred_boxes_info, deltas_info, bbox_info,
expected)
114 template <
typename T>
123 validate(
Accessor(_target), _reference, relative_tolerance_f32, 0.f, absolute_tolerance_f32);
127 #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 133 validate(
Accessor(_target), _reference, relative_tolerance_f16, 0.03f, absolute_tolerance_f16);
136 #endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 142 template <
typename T>
143 using NEBoundingBoxTransformQuantizedFixture = BoundingBoxTransformQuantizedFixture<Tensor, Accessor, NEBoundingBoxTransform, T>;
half_float::half half
16-bit floating point type
1 channel, 1 F32 per channel
ARM_COMPUTE_EXPECT(has_error==expected, framework::LogLevel::ERRORS)
quantized, asymmetric fixed-point 16-bit number
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.
1 channel, 1 F16 per channel
Quantization information.
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)
Accessor implementation for Tensor objects.
DatasetMode
Possible dataset modes.
TEST_SUITE_END() FIXTURE_DATA_TEST_CASE(RunSmall
[CLActivationLayer Test snippet]
TEST_SUITE(U8_to_S8) FIXTURE_DATA_TEST_CASE(RunSmall
validate(CLAccessor(output_state), expected_output)
FIXTURE_DATA_TEST_CASE(RunSmall, CLAbsLayerFixture< half >, framework::DatasetMode::PRECOMMIT, combine(datasets::SmallShapes(), framework::dataset::make("DataType", DataType::F16)))
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}))
DataType
Available data types.
BoundingBoxTransformFixture< Tensor, Accessor, NEBoundingBoxTransform, T > NEBoundingBoxTransformFixture
combine(datasets::SmallShapes(), framework::dataset::make("DataType", DataType::F32)))