ArmNN
 22.08
LstmParameters.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2021 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
8 
9 namespace armnn
10 {
11 
12 class ScopedTensorHandle;
13 
15 {
16  /// A unique pointer to represent 1D weights tensor with dimensions [num_units].
17  std::shared_ptr<ConstTensorHandle> m_InputLayerNormWeights;
18  /// A unique pointer to represent 1D weights tensor with dimensions [num_units].
19  std::shared_ptr<ConstTensorHandle> m_ForgetLayerNormWeights;
20  /// A unique pointer to represent 1D weights tensor with dimensions [num_units].
21  std::shared_ptr<ConstTensorHandle> m_CellLayerNormWeights;
22  /// A unique pointer to represent 1D weights tensor with dimensions [num_units].
23  std::shared_ptr<ConstTensorHandle> m_OutputLayerNormWeights;
24 };
25 
27 {
28  /// A unique pointer to represent 2D weights tensor with dimensions [input_size, num_units].
29  std::shared_ptr<ConstTensorHandle> m_InputToInputWeights;
30  /// A unique pointer to represent 2D weights tensor with dimensions [input_size, num_units].
31  std::shared_ptr<ConstTensorHandle> m_RecurrentToInputWeights;
32  /// A unique pointer to represent 1D weights tensor with dimensions [num_units].
33  std::shared_ptr<ConstTensorHandle> m_InputGateBias;
34 };
35 
37 {
38  /// A unique pointer to represent 2D weights tensor with dimensions [output_size, num_units].
39  std::shared_ptr<ConstTensorHandle> m_ProjectionWeights;
40  /// A unique pointer to represent 1D weights tensor with dimensions [output_size].
41  std::shared_ptr<ConstTensorHandle> m_ProjectionBias;
42 };
43 
45 {
46  /// A unique pointer to represent 1D weights tensor with dimensions [num_units].
47  std::shared_ptr<ConstTensorHandle> m_CellToInputWeights;
48  /// A unique pointer to represent 1D weights tensor with dimensions [num_units].
49  std::shared_ptr<ConstTensorHandle> m_CellToForgetWeights;
50  /// A unique pointer to represent 1D weights tensor with dimensions [num_units].
51  std::shared_ptr<ConstTensorHandle> m_CellToOutputWeights;
52 };
53 
55 {
56  /// A unique pointer to represent 2D weights tensor with dimensions [input_size, num_units].
57  std::shared_ptr<ConstTensorHandle> m_InputToForgetWeights;
58  /// A unique pointer to represent 2D weights tensor with dimensions [input_size, num_units].
59  std::shared_ptr<ConstTensorHandle> m_InputToCellWeights;
60  /// A unique pointer to represent 2D weights tensor with dimensions [input_size, num_units].
61  std::shared_ptr<ConstTensorHandle> m_InputToOutputWeights;
62  /// A unique pointer to represent 2D weights tensor with dimensions [output_size, num_units].
63  std::shared_ptr<ConstTensorHandle> m_RecurrentToForgetWeights;
64  /// A unique pointer to represent 2D weights tensor with dimensions [output_size, num_units].
65  std::shared_ptr<ConstTensorHandle> m_RecurrentToCellWeights;
66  /// A unique pointer to represent 2D weights tensor with dimensions [output_size, num_units].
67  std::shared_ptr<ConstTensorHandle> m_RecurrentToOutputWeights;
68  /// A unique pointer to represent 1D weights tensor with dimensions [num_units].
69  std::shared_ptr<ConstTensorHandle> m_ForgetGateBias;
70  /// A unique pointer to represent 1D weights tensor with dimensions [num_units].
71  std::shared_ptr<ConstTensorHandle> m_CellBias;
72  /// A unique pointer to represent 1D weights tensor with dimensions [num_units].
73  std::shared_ptr<ConstTensorHandle> m_OutputGateBias;
74 };
75 
76 } // namespace
std::shared_ptr< ConstTensorHandle > m_ForgetGateBias
A unique pointer to represent 1D weights tensor with dimensions [num_units].
std::shared_ptr< ConstTensorHandle > m_OutputGateBias
A unique pointer to represent 1D weights tensor with dimensions [num_units].
std::shared_ptr< ConstTensorHandle > m_OutputLayerNormWeights
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_InputLayerNormWeights
A unique pointer to represent 1D weights tensor with dimensions [num_units].
std::shared_ptr< ConstTensorHandle > m_ProjectionWeights
A unique pointer to represent 2D weights tensor with dimensions [output_size, num_units].
Copyright (c) 2021 ARM Limited and Contributors.
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_InputGateBias
A unique pointer to represent 1D weights tensor with dimensions [num_units].
std::shared_ptr< ConstTensorHandle > m_CellToOutputWeights
A unique pointer to represent 1D weights tensor with dimensions [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_CellBias
A unique pointer to represent 1D weights tensor with dimensions [num_units].
std::shared_ptr< ConstTensorHandle > m_RecurrentToInputWeights
A unique pointer to represent 2D weights tensor with dimensions [input_size, 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_RecurrentToOutputWeights
A unique pointer to represent 2D weights tensor with dimensions [output_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_ProjectionBias
A unique pointer to represent 1D weights tensor with dimensions [output_size].
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_RecurrentToForgetWeights
A unique pointer to represent 2D weights tensor with dimensions [output_size, 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_CellToInputWeights
A unique pointer to represent 1D weights tensor with dimensions [num_units].
std::shared_ptr< ConstTensorHandle > m_InputToOutputWeights
A unique pointer to represent 2D weights tensor with dimensions [input_size, num_units].