24 #ifndef __ARM_COMPUTE_TEST_VALIDATION_HELPERS_H__ 25 #define __ARM_COMPUTE_TEST_VALIDATION_HELPERS_H__ 34 #include <type_traits> 64 std::pair<T, T> bounds;
70 using namespace half_float::literal;
78 bounds = std::make_pair(-10._h, 10._h);
82 bounds = std::make_pair(0._h, 255._h);
85 bounds = std::make_pair(-255._h, 255._h);
96 bounds = std::make_pair(-40.f, 40.f);
100 bounds = std::make_pair(0.f, 255.f);
103 bounds = std::make_pair(-255.f, 255.f);
115 bounds = std::make_pair(-(1 << fixed_point_position), 1 << fixed_point_position);
163 float sensitivity{ 0.f };
164 float min_dist{ 0.f };
165 uint8_t constant_border_value{ 0 };
176 template <
typename T>
179 std::mt19937 generator(
library->seed());
184 table[i] = distribution(generator);
194 template <
typename T>
197 const bool is_float = std::is_floating_point<T>::value;
198 std::pair<T, T> bounds;
203 bounds = std::make_pair(-1.f, 1.f);
207 bounds = std::make_pair(1, 1 << (fixed_point_position));
217 template <
typename T>
220 std::pair<T, T> bounds;
222 bounds = std::make_pair(-1.f, 1.f);
269 template <
typename T>
std::pair< T, T > get_activation_layer_test_bounds(ActivationLayerInfo::ActivationFunction activation, DataType data_type, int fixed_point_position=0)
Helper function to get the testing range for each activation layer.
#define ARM_COMPUTE_ERROR(...)
Print the given message then throw an std::runtime_error.
quantized, symmetric fixed-point 16-bit number
fixed_point< T > min(fixed_point< T > x, fixed_point< T > y)
quantized, symmetric fixed-point 8-bit number
void fill_mask_from_pattern(uint8_t *mask, int cols, int rows, MatrixPattern pattern)
Fill mask with the corresponding given pattern.
void matrix_multiply(const SimpleTensor< float > &a, const SimpleTensor< float > &b, SimpleTensor< float > &out)
Matrix multiply between 2 float simple tensors.
half_float::half half
16-bit floating point type
1 channel, 1 F32 per channel
TensorShape calculate_depth_concatenate_shape(const std::vector< TensorShape > &input_shapes)
Calculate output tensor shape give a vector of input tensor to concatenate.
This file contains all available output stages for GEMMLowp on OpenCL.
ActivationFunction
Available activation functions.
1 channel, 1 F16 per channel
TensorShape calculate_width_concatenate_shape(const std::vector< TensorShape > &input_shapes)
Calculate output tensor shape give a vector of input tensor to concatenate.
SimpleTensor< uint8_t > convert_to_asymmetric(const SimpleTensor< float > &src, const QuantizationInfo &quantization_info)
Convert float simple tensor into quantized using specified quantization information.
std::unique_ptr< AssetsLibrary > library
HarrisCornersParameters harris_corners_parameters()
Generate parameters for Harris Corners algorithm.
Parameters of Harris Corners algorithm.
std::pair< T, T > get_normalize_planar_yuv_layer_test_bounds()
Helper function to get the testing range for NormalizePlanarYUV layer.
Simple tensor object that stores elements in a consecutive chunk of memory.
std::pair< T, T > get_batchnormalization_layer_test_bounds(int fixed_point_position=1)
Helper function to get the testing range for batch normalization layer.
void fill_lookuptable(T &&table)
Helper function to fill the Lut random by a ILutAccessor.
void get_tile(const SimpleTensor< T > &in, SimpleTensor< T > &tile, const Coordinates &coord)
Get a 2D tile from a tensor.
SimpleTensor< float > convert_from_asymmetric(const SimpleTensor< uint8_t > &src)
Convert quantized simple tensor into float using tensor quantization information. ...
fixed_point< T > max(fixed_point< T > x, fixed_point< T > y)
Quantization settings (used for QASYMM8 data type)
void transpose_matrix(const SimpleTensor< float > &in, SimpleTensor< float > &out)
Transpose matrix.
DataType
Available data types.
MatrixPattern
Available matrix patterns.
SimpleTensor< T > threshold(const SimpleTensor< T > &src, T threshold, T false_value, T true_value, ThresholdType type, T upper)
convolution configure & src