Compute Library
18.05
|
#include "arm_compute/core/Types.h"
#include "arm_compute/runtime/CL/CLTensor.h"
#include "arm_compute/runtime/CL/CLTensorAllocator.h"
#include "arm_compute/runtime/CL/functions/CLBatchNormalizationLayer.h"
#include "tests/CL/CLAccessor.h"
#include "tests/PaddingCalculator.h"
#include "tests/datasets/RandomBatchNormalizationLayerDataset.h"
#include "tests/datasets/ShapeDatasets.h"
#include "tests/framework/Asserts.h"
#include "tests/framework/Macros.h"
#include "tests/framework/datasets/Datasets.h"
#include "tests/validation/Helpers.h"
#include "tests/validation/Validation.h"
#include "tests/validation/fixtures/BatchNormalizationLayerFixture.h"
Go to the source code of this file.
Namespaces | |
arm_compute | |
This file contains all available output stages for GEMMLowp on OpenCL. | |
arm_compute::test | |
arm_compute::test::validation | |
Typedefs | |
template<typename T > | |
using | CLBatchNormalizationLayerFixture = BatchNormalizationLayerValidationFixture< CLTensor, CLAccessor, CLBatchNormalizationLayer, T > |
template<typename T > | |
using | CLBatchNormalizationLayerFixedPointFixture = BatchNormalizationLayerValidationFixedPointFixture< CLTensor, CLAccessor, CLBatchNormalizationLayer, T > |
Functions | |
DATA_TEST_CASE (Configuration, framework::DatasetMode::ALL, combine(combine(combine(datasets::RandomBatchNormalizationLayerDataset(), combine(framework::dataset::make("UseBeta",{false, true}), framework::dataset::make("UseGamma",{false, true}))), framework::dataset::make("DataType",{DataType::QS8, DataType::QS16, DataType::F16, DataType::F32})), framework::dataset::make("DataLayout",{DataLayout::NCHW, DataLayout::NHWC})), shape0, shape1, epsilon, use_gamma, use_beta, dt, data_layout) | |
DATA_TEST_CASE (Validate, framework::DatasetMode::ALL, zip(zip(zip(zip(framework::dataset::make("InputInfo",{TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QS8, 2), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QS8, 2), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QS8, 2), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QS8, 2),}), framework::dataset::make("OutputInfo",{TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F16), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QS8, 3), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QS8, 3), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QS8, 2), TensorInfo(),})), framework::dataset::make("MVBGInfo",{TensorInfo(TensorShape(2U), 1, DataType::F32), TensorInfo(TensorShape(2U), 1, DataType::F32), TensorInfo(TensorShape(2U), 1, DataType::F16), TensorInfo(TensorShape(2U), 1, DataType::F32), TensorInfo(TensorShape(5U), 1, DataType::F32), TensorInfo(TensorShape(2U), 1, DataType::QS8, 2), TensorInfo(TensorShape(2U), 1, DataType::QS8, 2), TensorInfo(TensorShape(2U), 1, DataType::F32), TensorInfo(TensorShape(2U), 1, DataType::F32), TensorInfo(TensorShape(2U), 1, DataType::QS8, 2), TensorInfo(TensorShape(2U), 1, DataType::QS8, 2),})), framework::dataset::make("ActivationLayerInfo",{ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::BOUNDED_RELU, 6.f), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::BOUNDED_RELU, 6.f), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LU_BOUNDED_RELU, 6.f), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LU_BOUNDED_RELU, 6.f, 2.f), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LU_BOUNDED_RELU, 6.f, 2.f), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::TANH), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LU_BOUNDED_RELU, 2.f, 6.f), ActivationLayerInfo(), ActivationLayerInfo(),})), framework::dataset::make("Expected",{true, false, false, false, false, false, false, false, false, true, true})), input_info, output_info, mvbg_info, act_info, expected) | |
FIXTURE_DATA_TEST_CASE (Random, CLBatchNormalizationLayerFixture< float >, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(datasets::RandomBatchNormalizationLayerDataset(), combine(framework::dataset::make("UseBeta",{false, true}), framework::dataset::make("UseGamma",{false, true}))), act_infos), framework::dataset::make("DataType", DataType::F32)), framework::dataset::make("DataLayout",{DataLayout::NCHW, DataLayout::NHWC}))) | |
FIXTURE_DATA_TEST_CASE (Random, CLBatchNormalizationLayerFixture< half >, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(datasets::RandomBatchNormalizationLayerDataset(), combine(framework::dataset::make("UseBeta",{false, true}), framework::dataset::make("UseGamma",{false, true}))), framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::BOUNDED_RELU, 6.f))), framework::dataset::make("DataType", DataType::F16)), framework::dataset::make("DataLayout",{DataLayout::NCHW, DataLayout::NHWC}))) | |
FIXTURE_DATA_TEST_CASE (Random, CLBatchNormalizationLayerFixedPointFixture< int8_t >, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(combine(combine(datasets::RandomBatchNormalizationLayerDataset(), framework::dataset::make("UseBeta", false)), framework::dataset::make("UseGamma", false)), framework::dataset::make("ActivationInfo", ActivationLayerInfo())), framework::dataset::make("DataType", DataType::QS8)), framework::dataset::make("DataLayout", DataLayout::NCHW)), framework::dataset::make("FractionalBits", 1, 6))) | |
FIXTURE_DATA_TEST_CASE (Random, CLBatchNormalizationLayerFixedPointFixture< int16_t >, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(combine(combine(datasets::RandomBatchNormalizationLayerDataset(), framework::dataset::make("UseBeta", false)), framework::dataset::make("UseGamma", false)), framework::dataset::make("ActivationInfo", ActivationLayerInfo())), framework::dataset::make("DataType", DataType::QS16)), framework::dataset::make("DataLayout", DataLayout::NCHW)), framework::dataset::make("FractionalBits", 1, 14))) | |