30 #include "tests/datasets/RandomBatchNormalizationLayerDataset.h" 31 #include "tests/datasets/ShapeDatasets.h" 37 #include "tests/validation/fixtures/BatchNormalizationLayerFixture.h" 47 constexpr AbsoluteTolerance<float> tolerance_f(0.00001f);
48 constexpr AbsoluteTolerance<float> tolerance_f16(0.01f);
64 combine(framework::dataset::
make("UseBeta", {
false,
true }),
68 shape0, shape1, epsilon, use_beta, use_gamma, dt, data_layout)
82 GCTensor mean = create_tensor<GCTensor>(shape1, dt, 1, fixed_point_position);
83 GCTensor var = create_tensor<GCTensor>(shape1, dt, 1, fixed_point_position);
84 GCTensor beta = create_tensor<GCTensor>(shape1, dt, 1, fixed_point_position);
85 GCTensor gamma = create_tensor<GCTensor>(shape1, dt, 1, fixed_point_position);
89 GCTensor *beta_ptr = use_beta ? &beta :
nullptr;
90 GCTensor *gamma_ptr = use_gamma ? &gamma :
nullptr;
91 norm.configure(&src, &dst, &mean, &var, beta_ptr, gamma_ptr, epsilon);
95 validate(dst.info()->valid_region(), valid_region);
101 combine(framework::dataset::
make("UseBeta", {
false,
true }),
114 combine(framework::dataset::
make("UseBeta", {
false,
true }),
BatchNormalizationLayerValidationFixture< GCTensor, GCAccessor, GCBatchNormalizationLayer, T > GCBatchNormalizationLayerFixture
Accessor implementation for GCTensor objects.
Basic function to run GCBatchNormalizationLayerKernel and simulate a batch normalization layer...
half_float::half half
16-bit floating point type
1 channel, 1 F32 per channel
Strides PermutationVector
Permutation vector.
std::enable_if< is_container< T >::value, ContainerDataset< T > >::type make(std::string name, T &&values)
Helper function to create a ContainerDataset.
Interface for OpenGL ES tensor.
This file contains all available output stages for GEMMLowp on OpenCL.
1 channel, 1 F16 per channel
#define TEST_SUITE(SUITE_NAME)
void permute(Dimensions< T > &dimensions, const PermutationVector &perm)
Permutes given Dimensions according to a permutation vector.
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.
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 ( )
Upper Bounded Rectifier ( )
TEST_SUITE_END() DATA_TEST_CASE(Configuration
Num samples, height, width, channels.
combine(combine(combine(concat(datasets::SmallShapes(), datasets::LargeShapes()), framework::dataset::make("DataType",{DataType::U8, DataType::S16})), datasets::BorderModes()), framework::dataset::make("filter_size",{5}))
Quantization settings (used for QASYMM8 data type)
Container for valid region of a window.
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.