From 8ed39ae450a077c7e4d672b5f05ff1d68ee67aab Mon Sep 17 00:00:00 2001 From: Narumol Prangnawarat Date: Thu, 15 Jul 2021 16:16:25 +0100 Subject: MLCE-530 Add front end support for UnidirectionalSequenceLstm on ArmNN Signed-off-by: Narumol Prangnawarat Change-Id: I57bcbdec3eb0155f41af0fe7d6abf9bac2ec86eb --- src/armnn/layers/LstmLayer.hpp | 63 +----------------------------------------- 1 file changed, 1 insertion(+), 62 deletions(-) (limited to 'src/armnn/layers/LstmLayer.hpp') diff --git a/src/armnn/layers/LstmLayer.hpp b/src/armnn/layers/LstmLayer.hpp index f711ea7607..dc6d12a1d8 100644 --- a/src/armnn/layers/LstmLayer.hpp +++ b/src/armnn/layers/LstmLayer.hpp @@ -5,74 +5,13 @@ #pragma once #include "LayerWithParameters.hpp" +#include "LstmParameters.hpp" namespace armnn { class ScopedTensorHandle; -struct LstmOptLayerNormParameters -{ - /// A unique pointer to represent 1D weights tensor with dimensions [num_units]. - std::shared_ptr m_InputLayerNormWeights; - /// A unique pointer to represent 1D weights tensor with dimensions [num_units]. - std::shared_ptr m_ForgetLayerNormWeights; - /// A unique pointer to represent 1D weights tensor with dimensions [num_units]. - std::shared_ptr m_CellLayerNormWeights; - /// A unique pointer to represent 1D weights tensor with dimensions [num_units]. - std::shared_ptr m_OutputLayerNormWeights; -}; - -struct LstmOptCifgParameters -{ - /// A unique pointer to represent 2D weights tensor with dimensions [input_size, num_units]. - std::shared_ptr m_InputToInputWeights; - /// A unique pointer to represent 2D weights tensor with dimensions [input_size, num_units]. - std::shared_ptr m_RecurrentToInputWeights; - /// A unique pointer to represent 1D weights tensor with dimensions [num_units]. - std::shared_ptr m_InputGateBias; -}; - -struct LstmOptProjectionParameters -{ - /// A unique pointer to represent 2D weights tensor with dimensions [output_size, num_units]. - std::shared_ptr m_ProjectionWeights; - /// A unique pointer to represent 1D weights tensor with dimensions [output_size]. - std::shared_ptr m_ProjectionBias; -}; - -struct LstmOptPeepholeParameters -{ - /// A unique pointer to represent 1D weights tensor with dimensions [num_units]. - std::shared_ptr m_CellToInputWeights; - /// A unique pointer to represent 1D weights tensor with dimensions [num_units]. - std::shared_ptr m_CellToForgetWeights; - /// A unique pointer to represent 1D weights tensor with dimensions [num_units]. - std::shared_ptr m_CellToOutputWeights; -}; - -struct LstmBasicParameters -{ - /// A unique pointer to represent 2D weights tensor with dimensions [input_size, num_units]. - std::shared_ptr m_InputToForgetWeights; - /// A unique pointer to represent 2D weights tensor with dimensions [input_size, num_units]. - std::shared_ptr m_InputToCellWeights; - /// A unique pointer to represent 2D weights tensor with dimensions [input_size, num_units]. - std::shared_ptr m_InputToOutputWeights; - /// A unique pointer to represent 2D weights tensor with dimensions [output_size, num_units]. - std::shared_ptr m_RecurrentToForgetWeights; - /// A unique pointer to represent 2D weights tensor with dimensions [output_size, num_units]. - std::shared_ptr m_RecurrentToCellWeights; - /// A unique pointer to represent 2D weights tensor with dimensions [output_size, num_units]. - std::shared_ptr m_RecurrentToOutputWeights; - /// A unique pointer to represent 1D weights tensor with dimensions [num_units]. - std::shared_ptr m_ForgetGateBias; - /// A unique pointer to represent 1D weights tensor with dimensions [num_units]. - std::shared_ptr m_CellBias; - /// A unique pointer to represent 1D weights tensor with dimensions [num_units]. - std::shared_ptr m_OutputGateBias; -}; - /// This layer represents a LSTM operation. class LstmLayer : public LayerWithParameters { -- cgit v1.2.1