31 #include "tests/datasets/LargeConvolutionLayerDataset.h" 32 #include "tests/datasets/SmallConvolutionLayerDataset.h" 37 #include "tests/validation/fixtures/ConvolutionLayerFixture.h" 48 RelativeTolerance<float> tolerance_f32(0.00001f);
49 constexpr
float tolerance_num = 0.07f;
59 ActivationLayerInfo(),
70 ActivationFunctionsDataset),
79 GCTensor
src = create_tensor<GCTensor>(input_shape,
data_type, 1, fixed_point_position, QuantizationInfo(2.f / 255.f, 127));
80 GCTensor weights = create_tensor<GCTensor>(weights_shape,
data_type, 1, fixed_point_position, QuantizationInfo(2.f / 255.f, 127));
81 GCTensor bias = create_tensor<GCTensor>(bias_shape, bias_data_type, 1, fixed_point_position, QuantizationInfo(2.f / 255.f, 127));
82 GCTensor
dst = create_tensor<GCTensor>(
output_shape,
data_type, 1, fixed_point_position, QuantizationInfo(2.f / 255.f, 127));
89 const QuantizationInfo src_quantization_info = src.info()->quantization_info();
90 const QuantizationInfo weights_quantization_info = weights.info()->quantization_info();
93 GCConvolutionLayer
conv;
94 conv.configure(&src, &weights, &bias, &dst, info, WeightsInfo(), dilation, act_info);
102 validate(src.info()->valid_region(), src_valid_region);
103 validate(weights.info()->valid_region(), weights_valid_region);
104 validate(bias.info()->valid_region(), bias_valid_region);
112 template <
typename T>
118 framework::dataset::
make("ReshapeWeights", {
true })),
123 ActivationFunctionsDataset))
134 ActivationFunctionsDataset))
143 framework::dataset::
make("ReshapeWeights", {
true })),
147 ActivationFunctionsDataset))
157 ActivationFunctionsDataset))
Accessor implementation for GCTensor objects.
half_float::half half
16-bit floating point type
1 channel, 1 F32 per channel
std::enable_if< is_container< T >::value, ContainerDataset< T > >::type make(std::string name, T &&values)
Helper function to create a ContainerDataset.
ConvolutionValidationFixture< GCTensor, GCAccessor, GCConvolutionLayer, T > GCConvolutionLayerFixture
src info() -> set_format(Format::S16)
This file contains all available output stages for GEMMLowp on OpenCL.
1 channel, 1 F16 per channel
#define TEST_SUITE(SUITE_NAME)
1 channel, 1 S32 per channel
FIXTURE_DATA_TEST_CASE(RunSmall, CLAbsoluteDifferenceFixture< uint8_t >, framework::DatasetMode::PRECOMMIT, combine(datasets::SmallShapes(), AbsoluteDifferenceU8Dataset))
validate(dst.info() ->valid_region(), dst_valid_region)
DatasetMode
Possible dataset modes.
bool is_data_type_fixed_point(DataType dt)
Check if a given data type is of fixed point type.
Num samples, channels, height, width.
bool is_data_type_quantized_asymmetric(DataType dt)
Check if a given data type is of asymmetric quantized type.
DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(concat(datasets::SmallShapes(), datasets::LargeShapes()), AbsoluteDifferenceU8Dataset), shape, data_type0, data_type1, output_data_type)
Upper Bounded Rectifier ( )
TEST_SUITE_END() DATA_TEST_CASE(Configuration
const ValidRegion dst_valid_region
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}))
JoinDataset< T, U > concat(T &&dataset1, U &&dataset2)
Helper function to create a JoinDataset.
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.