31 #include "tests/datasets/FullyConnectedLayerDataset.h" 36 #include "tests/validation/fixtures/FullyConnectedLayerFixture.h" 47 RelativeTolerance<float> tolerance_f32(0.05f);
48 RelativeTolerance<half_float::half> tolerance_f16(
half(0.2));
49 constexpr
float tolerance_num = 0.07f;
65 FullyConnectedParameters),
67 src_shape, weights_shape, bias_shape, dst_shape, transpose_weights, reshape_weights,
data_type)
72 TensorShape ws(weights_shape);
75 if(!reshape_weights || !transpose_weights)
77 const size_t shape_x = ws.x();
83 GCTensor
src = create_tensor<GCTensor>(src_shape,
data_type, 1, fixed_point_position);
84 GCTensor weights = create_tensor<GCTensor>(ws,
data_type, 1, fixed_point_position);
85 GCTensor bias = create_tensor<GCTensor>(bias_shape,
data_type, 1, fixed_point_position);
86 GCTensor
dst = create_tensor<GCTensor>(dst_shape,
data_type, 1, fixed_point_position);
94 GCFullyConnectedLayer fc;
95 fc.configure(&src, &weights, &bias, &dst, transpose_weights, !reshape_weights);
102 template <
typename T>
108 FullyConnectedParameters),
115 FullyConnectedParameters),
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.
This file contains all available output stages for GEMMLowp on OpenCL.
1 channel, 1 F16 per channel
#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)
DatasetMode
Possible dataset modes.
bool is_data_type_fixed_point(DataType dt)
Check if a given data type is of fixed point type.
FullyConnectedLayerValidationFixture< GCTensor, GCAccessor, GCFullyConnectedLayer, T, false > GCFullyConnectedLayerFixture
DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(concat(datasets::SmallShapes(), datasets::LargeShapes()), AbsoluteDifferenceU8Dataset), shape, data_type0, data_type1, output_data_type)
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.
DataType
Available data types.
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.