58 constexpr AbsoluteTolerance<uint8_t> tolerance_u8(1);
59 constexpr AbsoluteTolerance<int16_t> tolerance_s16(1);
60 RelativeTolerance<float> tolerance_f32(0.05);
61 RelativeTolerance<half> tolerance_f16(
half(0.1));
63 constexpr
float tolerance_num_f32(0.01f);
74 std::mt19937 generator(
library->seed());
75 std::uniform_real_distribution<float> distribution_float(0.25, 2);
76 const float scale_x = distribution_float(generator);
77 const float scale_y = distribution_float(generator);
78 std::uniform_int_distribution<uint8_t> distribution_u8(0, 255);
79 uint8_t constant_border_value = distribution_u8(generator);
84 shape_scaled.set(0, shape[0] * scale_x);
85 shape_scaled.set(1, shape[1] * scale_y);
93 clscale.
configure(&src, &dst, policy, border_mode, constant_border_value);
110 template <
typename T>
124 validate(
CLAccessor(_target), _reference, valid_region, tolerance_f32, tolerance_num_f32);
135 validate(
CLAccessor(_target), _reference, valid_region, tolerance_f32, tolerance_num_f32);
InterpolationPolicy
Interpolation method.
Data set containing large tensor shapes.
bool is_resizable() const override
Flag indicating whether the size of the tensor can be changed.
Container for 2D border size.
ValidRegion valid_region() const override
Valid region of the tensor.
half_float::half half
16-bit floating point type
1 channel, 1 F16 per channel
FIXTURE_DATA_TEST_CASE(RunSmall, CLActivationLayerFixture< half >, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::SmallShapes(), ActivationDataset), framework::dataset::make("DataType", DataType::F16)))
Output values are defined by bilinear interpolation between the pixels.
combine(concat(datasets::Small2DShapes(), datasets::Large2DShapes()), framework::dataset::make("DataType", DataType::S16))
std::enable_if< is_container< T >::value, ContainerDataset< T > >::type make(std::string name, T &&values)
Helper function to create a ContainerDataset.
PaddingSize padding() const override
Padding of tensor.
TensorInfo * info() const override
Interface to be implemented by the child class to return the tensor's metadata.
Output values are defined to match the source pixel whose center is nearest to the sample position...
Basic function to run CLScaleKernel.
1 channel, 1 U32 per channel
DatasetMode
Possible dataset modes.
ARM_COMPUTE_EXPECT(shape.num_dimensions()==dimension+1, framework::LogLevel::ERRORS)
std::unique_ptr< AssetsLibrary > library
ValidRegion calculate_valid_region_scale(const ITensorInfo &src_info, const TensorShape &dst_shape, InterpolationPolicy policy, BorderSize border_size, bool border_undefined)
Helper function to calculate the Valid Region for Scale.
Accessor implementation for CLTensor objects.
1 channel, 1 U8 per channel
void configure(ICLTensor *input, ICLTensor *output, InterpolationPolicy policy, BorderMode border_mode, PixelValue constant_border_value=PixelValue())
Initialize the function's source, destination, interpolation type and border_mode.
TEST_SUITE_END() DATA_TEST_CASE(Configuration
Borders are left undefined.
void validate(const arm_compute::ValidRegion ®ion, const arm_compute::ValidRegion &reference)
Validate valid regions.
#define TEST_SUITE(SUITE_NAME)
Store the tensor's metadata.
JoinDataset< T, U > concat(T &&dataset1, U &&dataset2)
Helper function to create a JoinDataset.
DataType
Available data types.
DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(combine(concat(datasets::SmallShapes(), datasets::LargeShapes()), CNNDataTypes), framework::dataset::make("InPlace",{false, true})), shape, data_type, in_place)
Calculate required padding.
void set_border_mode(BorderMode mode)
Set border mode.
Basic implementation of the OpenCL tensor interface.