diff options
author | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2021-07-15 16:16:25 +0100 |
---|---|---|
committer | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2021-07-22 18:29:55 +0100 |
commit | 8ed39ae450a077c7e4d672b5f05ff1d68ee67aab (patch) | |
tree | 31a1cf006e50db54f3e7a605825c8e9e3f9d689e /src/armnn/layers/LstmLayer.hpp | |
parent | 15fcc7ed3163c9d4b1856955271854198c3c2696 (diff) | |
download | armnn-8ed39ae450a077c7e4d672b5f05ff1d68ee67aab.tar.gz |
MLCE-530 Add front end support for UnidirectionalSequenceLstm on ArmNN
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com>
Change-Id: I57bcbdec3eb0155f41af0fe7d6abf9bac2ec86eb
Diffstat (limited to 'src/armnn/layers/LstmLayer.hpp')
-rw-r--r-- | src/armnn/layers/LstmLayer.hpp | 63 |
1 files changed, 1 insertions, 62 deletions
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<ConstTensorHandle> m_InputLayerNormWeights; - /// A unique pointer to represent 1D weights tensor with dimensions [num_units]. - std::shared_ptr<ConstTensorHandle> m_ForgetLayerNormWeights; - /// A unique pointer to represent 1D weights tensor with dimensions [num_units]. - std::shared_ptr<ConstTensorHandle> m_CellLayerNormWeights; - /// A unique pointer to represent 1D weights tensor with dimensions [num_units]. - std::shared_ptr<ConstTensorHandle> m_OutputLayerNormWeights; -}; - -struct LstmOptCifgParameters -{ - /// A unique pointer to represent 2D weights tensor with dimensions [input_size, num_units]. - std::shared_ptr<ConstTensorHandle> m_InputToInputWeights; - /// A unique pointer to represent 2D weights tensor with dimensions [input_size, num_units]. - std::shared_ptr<ConstTensorHandle> m_RecurrentToInputWeights; - /// A unique pointer to represent 1D weights tensor with dimensions [num_units]. - std::shared_ptr<ConstTensorHandle> m_InputGateBias; -}; - -struct LstmOptProjectionParameters -{ - /// A unique pointer to represent 2D weights tensor with dimensions [output_size, num_units]. - std::shared_ptr<ConstTensorHandle> m_ProjectionWeights; - /// A unique pointer to represent 1D weights tensor with dimensions [output_size]. - std::shared_ptr<ConstTensorHandle> m_ProjectionBias; -}; - -struct LstmOptPeepholeParameters -{ - /// A unique pointer to represent 1D weights tensor with dimensions [num_units]. - std::shared_ptr<ConstTensorHandle> m_CellToInputWeights; - /// A unique pointer to represent 1D weights tensor with dimensions [num_units]. - std::shared_ptr<ConstTensorHandle> m_CellToForgetWeights; - /// A unique pointer to represent 1D weights tensor with dimensions [num_units]. - std::shared_ptr<ConstTensorHandle> m_CellToOutputWeights; -}; - -struct LstmBasicParameters -{ - /// A unique pointer to represent 2D weights tensor with dimensions [input_size, num_units]. - std::shared_ptr<ConstTensorHandle> m_InputToForgetWeights; - /// A unique pointer to represent 2D weights tensor with dimensions [input_size, num_units]. - std::shared_ptr<ConstTensorHandle> m_InputToCellWeights; - /// A unique pointer to represent 2D weights tensor with dimensions [input_size, num_units]. - std::shared_ptr<ConstTensorHandle> m_InputToOutputWeights; - /// A unique pointer to represent 2D weights tensor with dimensions [output_size, num_units]. - std::shared_ptr<ConstTensorHandle> m_RecurrentToForgetWeights; - /// A unique pointer to represent 2D weights tensor with dimensions [output_size, num_units]. - std::shared_ptr<ConstTensorHandle> m_RecurrentToCellWeights; - /// A unique pointer to represent 2D weights tensor with dimensions [output_size, num_units]. - std::shared_ptr<ConstTensorHandle> m_RecurrentToOutputWeights; - /// A unique pointer to represent 1D weights tensor with dimensions [num_units]. - std::shared_ptr<ConstTensorHandle> m_ForgetGateBias; - /// A unique pointer to represent 1D weights tensor with dimensions [num_units]. - std::shared_ptr<ConstTensorHandle> m_CellBias; - /// A unique pointer to represent 1D weights tensor with dimensions [num_units]. - std::shared_ptr<ConstTensorHandle> m_OutputGateBias; -}; - /// This layer represents a LSTM operation. class LstmLayer : public LayerWithParameters<LstmDescriptor> { |