29 #include "tests/datasets/BorderModeDataset.h" 30 #include "tests/datasets/ShapeDatasets.h" 35 #include "tests/validation/fixtures/LaplacianPyramidFixture.h" 51 inline void validate_laplacian_pyramid(
const Pyramid &target,
const std::vector<SimpleTensor<T>> &reference,
BorderMode border_mode)
53 Tensor *level_image = target.get_pyramid_level(0);
57 validate(Accessor(*level_image), reference[0], valid_region);
60 for(
size_t lev = 1; lev < target.info()->num_levels(); lev++)
62 level_image = target.get_pyramid_level(lev);
63 Tensor *prev_level_image = target.get_pyramid_level(lev - 1);
66 prev_level_image->info()->valid_region(),
70 validate(Accessor(*level_image), reference[lev], valid_region);
85 datasets::Medium2DShapes(),
86 datasets::BorderModes()),
87 small_laplacian_pyramid_levels),
90 validate_laplacian_pyramid(_target, _reference, _border_mode);
95 datasets::Large2DShapes(),
96 datasets::BorderModes()),
97 large_laplacian_pyramid_levels),
100 validate_laplacian_pyramid(_target, _reference, _border_mode);
BorderMode
Methods available to handle borders.
1 channel, 1 U8 per channel
std::enable_if< is_container< T >::value, ContainerDataset< T > >::type make(std::string name, T &&values)
Helper function to create a ContainerDataset.
const ValidRegion valid_region
Copyright (c) 2017-2021 Arm Limited.
Basic implementation of the pyramid interface.
ValidRegion shape_to_valid_region_laplacian_pyramid(const TensorShape &a_shape, const ValidRegion &a_valid_region, bool border_undefined=false)
Create a valid region for Laplacian Pyramid based on tensor shape and valid region at level "i - 1" a...
Basic function to execute laplacian pyramid.
Accessor implementation for Tensor objects.
DatasetMode
Possible dataset modes.
TEST_SUITE_END() FIXTURE_DATA_TEST_CASE(RunSmall
[CLActivationLayer Test snippet]
Basic implementation of the tensor interface.
TEST_SUITE(U8_to_S8) FIXTURE_DATA_TEST_CASE(RunSmall
validate(CLAccessor(output_state), expected_output)
1 channel, 1 S16 per channel
FIXTURE_DATA_TEST_CASE(RunSmall, CLAbsLayerFixture< half >, framework::DatasetMode::PRECOMMIT, combine(datasets::SmallShapes(), framework::dataset::make("DataType", DataType::F16)))
Borders are left undefined.
LaplacianPyramidValidationFixture< Tensor, Accessor, NELaplacianPyramid, uint8_t, int16_t, Pyramid > NELaplacianPyramidFixture
combine(datasets::SmallShapes(), framework::dataset::make("DataType", DataType::F32)))
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.