30 #include "tests/datasets/ActivationFunctionsDataset.h" 31 #include "tests/datasets/ShapeDatasets.h" 36 #include "tests/validation/fixtures/ActivationLayerFixture.h" 64 return AbsoluteTolerance<float>(5.f);
66 return AbsoluteTolerance<float>(11.f);
68 return AbsoluteTolerance<float>(0.01f);
70 return AbsoluteTolerance<float>(0.00001f);
74 return AbsoluteTolerance<float>(0.f);
81 #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 110 NEActivationLayer act_layer;
123 validate(src.info()->valid_region(), valid_region);
127 validate(dst.info()->valid_region(), valid_region);
131 const PaddingSize padding = PaddingCalculator(shape.x(), 16).required_padding();
132 validate(src.info()->padding(), padding);
136 validate(dst.info()->padding(), padding);
170 template <
typename T>
174 #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 209 template <
typename T>
219 framework::dataset::
make("FractionalBits", 3, 6)))
239 framework::dataset::
make("FractionalBits", 1, 14)))
255 template <
typename T>
quantized, symmetric fixed-point 16-bit number
quantized, symmetric fixed-point 8-bit number
half_float::half half
16-bit floating point type
1 channel, 1 F32 per channel
static Status validate(const ITensorInfo *input, const ITensorInfo *output, const ActivationLayerInfo &act_info)
Static function to check if given info will lead to a valid configuration of NEActivationLayer.
const auto QuantizedActivationDataset
std::enable_if< is_container< T >::value, ContainerDataset< T > >::type make(std::string name, T &&values)
Helper function to create a ContainerDataset.
Activation Layer Information class.
ActivationValidationQuantizedFixture< Tensor, Accessor, NEActivationLayer, T > NEActivationLayerQuantizedFixture
This file contains all available output stages for GEMMLowp on OpenCL.
ActivationFunction
Available activation functions.
1 channel, 1 F16 per channel
ActivationValidationFixture< Tensor, Accessor, NEActivationLayer, T > NEActivationLayerFixture
#define TEST_SUITE(SUITE_NAME)
FIXTURE_DATA_TEST_CASE(RunSmall, CLAbsoluteDifferenceFixture< uint8_t >, framework::DatasetMode::PRECOMMIT, combine(datasets::SmallShapes(), AbsoluteDifferenceU8Dataset))
validate(dst.info() ->valid_region(), dst_valid_region)
Accessor implementation for Tensor objects.
DatasetMode
Possible dataset modes.
quantized, asymmetric fixed-point 8-bit number
bool is_data_type_fixed_point(DataType dt)
Check if a given data type is of fixed point type.
const auto QuantizedActivationFunctionsDataset
Input data sets.
BorderSize PaddingSize
Container for 2D padding size.
ActivationValidationFixedPointFixture< Tensor, Accessor, NEActivationLayer, T > NEActivationLayerFixedPointFixture
DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(concat(datasets::SmallShapes(), datasets::LargeShapes()), AbsoluteDifferenceU8Dataset), shape, data_type0, data_type1, output_data_type)
Lower and Upper Bounded Rectifier ( )
TEST_SUITE_END() DATA_TEST_CASE(Configuration
ARM_COMPUTE_EXPECT(src.info() ->is_resizable(), framework::LogLevel::ERRORS)
combine(combine(combine(concat(datasets::SmallShapes(), datasets::LargeShapes()), framework::dataset::make("DataType",{DataType::U8, DataType::S16})), datasets::BorderModes()), framework::dataset::make("filter_size",{5}))
Store the tensor's metadata.
JoinDataset< T, U > concat(T &&dataset1, U &&dataset2)
Helper function to create a JoinDataset.
Quantization settings (used for QASYMM8 data type)
DataType
Available data types.
zip(zip(zip(framework::dataset::make("InputInfo",{TensorInfo(TensorShape(3U, 3U, 5U, 3U), 1, DataType::F16), TensorInfo(TensorShape(3U, 3U, 5U, 3U), 1, DataType::QASYMM8), TensorInfo(TensorShape(5U, 5U, 5U, 3U), 1, DataType::F32), TensorInfo(TensorShape(3U, 3U), 1, DataType::F32), TensorInfo(TensorShape(3U, 3U, 5U, 3U), 1, DataType::F32), TensorInfo(TensorShape(3U, 3U, 37U, 2U), 1, DataType::F32), TensorInfo(TensorShape(3U, 3U, 37U, 22U), 1, DataType::F32)}), framework::dataset::make("OutputInfo",{TensorInfo(TensorShape(3U, 5U, 16U), 1, DataType::F16), TensorInfo(TensorShape(3U, 5U, 16U), 1, DataType::QASYMM8), TensorInfo(TensorShape(3U, 5U, 16U), 1, DataType::F32), TensorInfo(TensorShape(1U, 1U, 16U), 1, DataType::F32), TensorInfo(TensorShape(3U, 5U, 16U), 1, DataType::F32), TensorInfo(TensorShape(2U, 37U, 16U), 1, DataType::F32), TensorInfo(TensorShape(22U, 37U, 36U), 1, DataType::F32)})), framework::dataset::make("WinogradInfo",{WinogradInfo(Size2D(2U, 2U), Size2D(3U, 3U), Size2D(), PadStrideInfo(), DataLayout::NCHW), WinogradInfo(Size2D(2U, 2U), Size2D(3U, 3U), Size2D(), PadStrideInfo(), DataLayout::NCHW), WinogradInfo(Size2D(2U, 2U), Size2D(3U, 3U), Size2D(), PadStrideInfo(), DataLayout::NCHW), WinogradInfo(Size2D(3U, 3U), Size2D(3U, 3U), Size2D(), PadStrideInfo(), DataLayout::NCHW), WinogradInfo(Size2D(2U, 2U), Size2D(3U, 3U), Size2D(), PadStrideInfo(), DataLayout::NCHW), WinogradInfo(Size2D(2U, 2U), Size2D(3U, 3U), Size2D(), PadStrideInfo(), DataLayout::NCHW), WinogradInfo(Size2D(4U, 4U), Size2D(3U, 3U), Size2D(), PadStrideInfo(), DataLayout::NCHW)})), framework::dataset::make("Expected",{false, false, false, false, true, true, true}))
convolution configure & src
ValidRegion shape_to_valid_region(const TensorShape &a_shape, bool border_undefined=false, BorderSize border_size=BorderSize(0))
Create a valid region based on tensor shape, border mode and border size.