Compute Library
 22.05
LSTMLayer.cpp File Reference
#include "arm_compute/runtime/NEON/functions/NELSTMLayer.h"
#include "tests/NEON/Accessor.h"
#include "tests/PaddingCalculator.h"
#include "tests/datasets/LSTMLayerDataset.h"
#include "tests/framework/Asserts.h"
#include "tests/framework/Macros.h"
#include "tests/framework/datasets/Datasets.h"
#include "tests/validation/Validation.h"
#include "tests/validation/fixtures/LSTMLayerFixture.h"

Go to the source code of this file.

Namespaces

 arm_compute
 Copyright (c) 2017-2022 Arm Limited.
 
 arm_compute::test
 
 arm_compute::test::validation
 

Typedefs

template<typename T >
using NELSTMLayerFixture = LSTMLayerValidationFixture< Tensor, Accessor, NELSTMLayer, LSTMParams< ITensor >, T >
 

Functions

 DATA_TEST_CASE (Validate, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(zip(zip(zip(zip(framework::dataset::make("InputInfo", { TensorInfo(TensorShape(8U, 2U), 1, DataType::U8), TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(8U, 2U), 1, DataType::F32), TensorInfo(TensorShape(8U, 2U), 1, DataType::F32), TensorInfo(TensorShape(8U, 2U), 1, DataType::F32), TensorInfo(TensorShape(8U, 2U), 1, DataType::F32), TensorInfo(TensorShape(8U, 2U), 1, DataType::F32), TensorInfo(TensorShape(8U, 2U), 1, DataType::F32), }), framework::dataset::make("InputWeightsInfo", { TensorInfo(TensorShape(8U, 16U), 1, DataType::F32), TensorInfo(TensorShape(8U, 16U), 1, DataType::F32), TensorInfo(TensorShape(27U, 11U, 2U), 1, DataType::F32), TensorInfo(TensorShape(8U, 16U), 1, DataType::F32), TensorInfo(TensorShape(8U, 16U), 1, DataType::F32), TensorInfo(TensorShape(8U, 16U), 1, DataType::F32), TensorInfo(TensorShape(8U, 16U), 1, DataType::F32), TensorInfo(TensorShape(8U, 16U), 1, DataType::F32), })), framework::dataset::make("RecurrentWeightsInfo", { TensorInfo(TensorShape(16U, 16U), 1, DataType::F32), TensorInfo(TensorShape(16U, 16U), 1, DataType::F32), TensorInfo(TensorShape(16U, 16U), 1, DataType::F32), TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32), TensorInfo(TensorShape(16U, 16U), 1, DataType::F32), TensorInfo(TensorShape(16U, 16U), 1, DataType::F32), TensorInfo(TensorShape(16U, 16U), 1, DataType::F32), TensorInfo(TensorShape(16U, 16U), 1, DataType::F32), })), framework::dataset::make("CellBiasInfo", { TensorInfo(TensorShape(16U), 1, DataType::F32), TensorInfo(TensorShape(16U), 1, DataType::F32), TensorInfo(TensorShape(16U), 1, DataType::F32), TensorInfo(TensorShape(16U), 1, DataType::F32), TensorInfo(TensorShape(30U), 1, DataType::F32), TensorInfo(TensorShape(16U), 1, DataType::F32), TensorInfo(TensorShape(16U), 1, DataType::F32), TensorInfo(TensorShape(16U), 1, DataType::F32), })), framework::dataset::make("ProjectionBiasInfo", { TensorInfo(TensorShape(16U), 1, DataType::F32), TensorInfo(TensorShape(16U), 1, DataType::F32), TensorInfo(TensorShape(16U), 1, DataType::F32), TensorInfo(TensorShape(16U), 1, DataType::F32), TensorInfo(TensorShape(16U), 1, DataType::F32), TensorInfo(TensorShape(16U), 1, DataType::F32), TensorInfo(TensorShape(16U), 1, DataType::F32), TensorInfo(TensorShape(16U), 1, DataType::F32), })), framework::dataset::make("CellStateInfo", { TensorInfo(TensorShape(16U, 2U), 1, DataType::F32), TensorInfo(TensorShape(16U, 2U), 1, DataType::F32), TensorInfo(TensorShape(16U, 2U), 1, DataType::F32), TensorInfo(TensorShape(16U, 2U), 1, DataType::F32), TensorInfo(TensorShape(16U, 2U), 1, DataType::F32), TensorInfo(TensorShape(11U), 1, DataType::F32), TensorInfo(TensorShape(16U, 2U), 1, DataType::F32), TensorInfo(TensorShape(16U, 2U), 1, DataType::F32), })), framework::dataset::make("OutputInfo", { TensorInfo(TensorShape(16U, 2U), 1, DataType::F32), TensorInfo(TensorShape(16U, 2U), 1, DataType::F32), TensorInfo(TensorShape(16U, 2U), 1, DataType::F32), TensorInfo(TensorShape(16U, 2U), 1, DataType::F32), TensorInfo(TensorShape(16U, 2U), 1, DataType::F32), TensorInfo(TensorShape(16U, 2U), 1, DataType::F32), TensorInfo(TensorShape(11U, 2U), 1, DataType::F32), TensorInfo(TensorShape(16U, 2U), 1, DataType::F32), })), framework::dataset::make("ScratchInfo", { TensorInfo(TensorShape(64U, 2U), 1, DataType::F32), TensorInfo(TensorShape(64U, 2U), 1, DataType::F32), TensorInfo(TensorShape(64U, 2U), 1, DataType::F32), TensorInfo(TensorShape(64U, 2U), 1, DataType::F32), TensorInfo(TensorShape(64U, 2U), 1, DataType::F32), TensorInfo(TensorShape(64U, 2U), 1, DataType::F32), TensorInfo(TensorShape(64U, 2U), 1, DataType::F32), TensorInfo(TensorShape(12U, 2U), 1, DataType::F32), })), framework::dataset::make("ActivationInfo", { ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), })), framework::dataset::make("Expected", { false, false, false, false, false, false, false, false })), input_info, input_weights_info, recurrent_weights_info, cell_bias_info, projection_bias_info, cell_state_info, output_info, scratch_info, info, expected)
 
 FIXTURE_DATA_TEST_CASE (RunSmall, NELSTMLayerFixture< float >, framework::DatasetMode::ALL, combine(combine(combine(combine(datasets::SmallLSTMLayerDataset(), framework::dataset::make("DataType", DataType::F32)), framework::dataset::make("ProjectionOpt", { true, false })), framework::dataset::make("PeepholeOpt", { true, false })), framework::dataset::make("UseLayerNorm", { true, false })))