From f4019872c1134c6fcc1d6993e5746f55c1e79208 Mon Sep 17 00:00:00 2001 From: Nikhil Raj Date: Tue, 8 Mar 2022 20:01:38 +0000 Subject: IVGCVSW-6819 Fix the directory structure and broken link to latest docu Signed-off-by: Nikhil Raj Change-Id: I05b559d15faf92c76ff536719693b361316be4f3 --- 22.02/_q_lstm_layer_8hpp_source.xhtml | 156 ++++++++++++++++++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 22.02/_q_lstm_layer_8hpp_source.xhtml (limited to '22.02/_q_lstm_layer_8hpp_source.xhtml') diff --git a/22.02/_q_lstm_layer_8hpp_source.xhtml b/22.02/_q_lstm_layer_8hpp_source.xhtml new file mode 100644 index 0000000000..64781a0eea --- /dev/null +++ b/22.02/_q_lstm_layer_8hpp_source.xhtml @@ -0,0 +1,156 @@ + + + + + + + + + + + + + +ArmNN: src/armnn/layers/QLstmLayer.hpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  22.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
QLstmLayer.hpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2020 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 2D weights tensor with dimensions [num_units, inputSize] (QSymmS8).
17  std::shared_ptr<ConstTensorHandle> m_InputToForgetWeights;
18  /// A unique pointer to represent 2D weights tensor with dimensions [num_units, inputSize] (QSymmS8).
19  std::shared_ptr<ConstTensorHandle> m_InputToCellWeights;
20  /// A unique pointer to represent 2D weights tensor with dimensions [num_units, inputSize] (QSymmS8).
21  std::shared_ptr<ConstTensorHandle> m_InputToOutputWeights;
22 
23  /// A unique pointer to represent 2D weights tensor with dimensions [num_units, outputSize] (QSymmS8).
24  std::shared_ptr<ConstTensorHandle> m_RecurrentToForgetWeights;
25  /// A unique pointer to represent 2D weights tensor with dimensions [num_units, outputSize] (QSymmS8).
26  std::shared_ptr<ConstTensorHandle> m_RecurrentToCellWeights;
27  /// A unique pointer to represent 2D weights tensor with dimensions [num_units, outputSize] (QSymmS8).
28  std::shared_ptr<ConstTensorHandle> m_RecurrentToOutputWeights;
29 
30  /// A unique pointer to represent 1D bias tensor with dimensions [num_units] (int32).
31  std::shared_ptr<ConstTensorHandle> m_ForgetGateBias;
32  /// A unique pointer to represent 1D bias tensor with dimensions [num_units] (int32).
33  std::shared_ptr<ConstTensorHandle> m_CellBias;
34  /// A unique pointer to represent 1D bias tensor with dimensions [num_units] (int32).
35  std::shared_ptr<ConstTensorHandle> m_OutputGateBias;
36 };
37 
39 {
40  /// A unique pointer to represent 2D weights tensor with dimensions [output_size, num_units] (QSymmS8).
41  std::shared_ptr<ConstTensorHandle> m_ProjectionWeights;
42  /// A unique pointer to represent 1D weights tensor with dimensions [output_size] (int32).
43  std::shared_ptr<ConstTensorHandle> m_ProjectionBias;
44 };
45 
47 {
48  /// A unique pointer to represent 1D weights tensor with dimensions [num_units] (QSymmS16).
49  std::shared_ptr<ConstTensorHandle> m_CellToInputWeights;
50  /// A unique pointer to represent 1D weights tensor with dimensions [num_units] (QSymmS16).
51  std::shared_ptr<ConstTensorHandle> m_CellToForgetWeights;
52  /// A unique pointer to represent 1D weights tensor with dimensions [num_units] (QSymmS16).
53  std::shared_ptr<ConstTensorHandle> m_CellToOutputWeights;
54 };
55 
57 {
58  /// A unique pointer to represent 2D weights tensor with dimensions [input_size, num_units] (QSymmS8).
59  std::shared_ptr<ConstTensorHandle> m_InputToInputWeights;
60  /// A unique pointer to represent 2D weights tensor with dimensions [input_size, num_units] (QSymmS8).
61  std::shared_ptr<ConstTensorHandle> m_RecurrentToInputWeights;
62  /// A unique pointer to represent 1D weights tensor with dimensions [num_units] (int32).
63  std::shared_ptr<ConstTensorHandle> m_InputGateBias;
64 };
65 
67 {
68  /// A unique pointer to represent 1D weights tensor with dimensions [num_units] (QSymmS16).
69  std::shared_ptr<ConstTensorHandle> m_InputLayerNormWeights;
70  /// A unique pointer to represent 1D weights tensor with dimensions [num_units] (QSymmS16).
71  std::shared_ptr<ConstTensorHandle> m_ForgetLayerNormWeights;
72  /// A unique pointer to represent 1D weights tensor with dimensions [num_units] (QSymmS16).
73  std::shared_ptr<ConstTensorHandle> m_CellLayerNormWeights;
74  /// A unique pointer to represent 1D weights tensor with dimensions [num_units] (QSymmS16).
75  std::shared_ptr<ConstTensorHandle> m_OutputLayerNormWeights;
76 };
77 
78 /// This layer represents a QLstm operation.
79 class QLstmLayer : public LayerWithParameters<QLstmDescriptor>
80 {
81 public:
82 
88 
89  /// Makes a workload for the QLstm type.
90  /// @param [in] graph The graph where this layer can be found.
91  /// @param [in] factory The workload factory which will create the workload.
92  /// @return A pointer to the created workload, or nullptr if not created.
93  virtual std::unique_ptr<IWorkload> CreateWorkload(const IWorkloadFactory& factory) const override;
94 
95  /// Creates a dynamically-allocated copy of this layer.
96  /// @param [in] graph The graph into which this layer is being cloned.
97  QLstmLayer* Clone(Graph& graph) const override;
98 
99  /// Check if the input tensor shape(s)
100  /// will lead to a valid configuration of @ref QLstmLayer.
101  /// @param [in] shapeInferenceMethod Indicates if output shape shall be overwritten or just validated.
102  void ValidateTensorShapesFromInputs() override;
103 
104  /// By default returns inputShapes if the number of inputs are equal to number of outputs,
105  /// otherwise infers the output shapes from given input shapes and layer properties.
106  /// @param [in] inputShapes The input shapes layer has.
107  /// @return A vector to the inferred output shape.
108  std::vector<TensorShape> InferOutputShapes(const std::vector<TensorShape>& inputShapes) const override;
109 
111  void Accept(ILayerVisitor& visitor) const override;
113 
114 
115  void ExecuteStrategy(IStrategy& strategy) const override;
116 
117 protected:
118  /// Constructor to create a QLstmLayer.
119  /// @param [in] name Optional name for the layer.
120  QLstmLayer(const QLstmDescriptor& param, const char* name);
121 
122  /// Default destructor
123  ~QLstmLayer() = default;
124 
125  /// Retrieve the handles to the constant values stored by the layer.
126  /// @return A vector of the constant tensors stored by this layer.
127  Layer::ConstantTensors GetConstantTensorsByRef() override;
128 };
129 
130 } // namespace armnn
+ +
std::unique_ptr< armnn::IWorkload > CreateWorkload(const armnn::IWorkloadFactory &workloadFactory, const armnn::WorkloadInfo &info, const DescriptorType &descriptor)
+
QLstmOptProjectionParameters m_ProjectionParameters
Definition: QLstmLayer.hpp:85
+
std::shared_ptr< ConstTensorHandle > m_OutputGateBias
A unique pointer to represent 1D bias tensor with dimensions [num_units] (int32). ...
Definition: QLstmLayer.hpp:35
+
#define ARMNN_NO_DEPRECATE_WARN_BEGIN
Definition: Deprecated.hpp:33
+ +
std::shared_ptr< ConstTensorHandle > m_RecurrentToInputWeights
A unique pointer to represent 2D weights tensor with dimensions [input_size, num_units] (QSymmS8)...
Definition: QLstmLayer.hpp:61
+
std::shared_ptr< ConstTensorHandle > m_ForgetLayerNormWeights
A unique pointer to represent 1D weights tensor with dimensions [num_units] (QSymmS16).
Definition: QLstmLayer.hpp:71
+
std::shared_ptr< ConstTensorHandle > m_InputToOutputWeights
A unique pointer to represent 2D weights tensor with dimensions [num_units, inputSize] (QSymmS8)...
Definition: QLstmLayer.hpp:21
+
std::shared_ptr< ConstTensorHandle > m_InputLayerNormWeights
A unique pointer to represent 1D weights tensor with dimensions [num_units] (QSymmS16).
Definition: QLstmLayer.hpp:69
+
Copyright (c) 2021 ARM Limited and Contributors.
+
std::shared_ptr< ConstTensorHandle > m_CellToOutputWeights
A unique pointer to represent 1D weights tensor with dimensions [num_units] (QSymmS16).
Definition: QLstmLayer.hpp:53
+
std::shared_ptr< ConstTensorHandle > m_InputToCellWeights
A unique pointer to represent 2D weights tensor with dimensions [num_units, inputSize] (QSymmS8)...
Definition: QLstmLayer.hpp:19
+ +
QLstmOptLayerNormParameters m_LayerNormParameters
Definition: QLstmLayer.hpp:87
+
std::shared_ptr< ConstTensorHandle > m_CellBias
A unique pointer to represent 1D bias tensor with dimensions [num_units] (int32). ...
Definition: QLstmLayer.hpp:33
+
std::shared_ptr< ConstTensorHandle > m_ProjectionWeights
A unique pointer to represent 2D weights tensor with dimensions [output_size, num_units] (QSymmS8)...
Definition: QLstmLayer.hpp:41
+ +
std::shared_ptr< ConstTensorHandle > m_InputToForgetWeights
A unique pointer to represent 2D weights tensor with dimensions [num_units, inputSize] (QSymmS8)...
Definition: QLstmLayer.hpp:17
+
std::shared_ptr< ConstTensorHandle > m_InputGateBias
A unique pointer to represent 1D weights tensor with dimensions [num_units] (int32).
Definition: QLstmLayer.hpp:63
+ + +
std::vector< std::reference_wrapper< std::shared_ptr< ConstTensorHandle > >> ConstantTensors
Definition: INetwork.hpp:124
+
#define ARMNN_NO_DEPRECATE_WARN_END
Definition: Deprecated.hpp:34
+
std::shared_ptr< ConstTensorHandle > m_CellLayerNormWeights
A unique pointer to represent 1D weights tensor with dimensions [num_units] (QSymmS16).
Definition: QLstmLayer.hpp:73
+
std::shared_ptr< ConstTensorHandle > m_ForgetGateBias
A unique pointer to represent 1D bias tensor with dimensions [num_units] (int32). ...
Definition: QLstmLayer.hpp:31
+
std::shared_ptr< ConstTensorHandle > m_CellToInputWeights
A unique pointer to represent 1D weights tensor with dimensions [num_units] (QSymmS16).
Definition: QLstmLayer.hpp:49
+
std::shared_ptr< ConstTensorHandle > m_CellToForgetWeights
A unique pointer to represent 1D weights tensor with dimensions [num_units] (QSymmS16).
Definition: QLstmLayer.hpp:51
+ +
A QLstmDescriptor for the QLstmLayer.
+
std::shared_ptr< ConstTensorHandle > m_OutputLayerNormWeights
A unique pointer to represent 1D weights tensor with dimensions [num_units] (QSymmS16).
Definition: QLstmLayer.hpp:75
+ +
std::shared_ptr< ConstTensorHandle > m_RecurrentToCellWeights
A unique pointer to represent 2D weights tensor with dimensions [num_units, outputSize] (QSymmS8)...
Definition: QLstmLayer.hpp:26
+
QLstmBasicParameters m_BasicParameters
Definition: QLstmLayer.hpp:83
+
std::shared_ptr< ConstTensorHandle > m_RecurrentToOutputWeights
A unique pointer to represent 2D weights tensor with dimensions [num_units, outputSize] (QSymmS8)...
Definition: QLstmLayer.hpp:28
+
std::shared_ptr< ConstTensorHandle > m_InputToInputWeights
A unique pointer to represent 2D weights tensor with dimensions [input_size, num_units] (QSymmS8)...
Definition: QLstmLayer.hpp:59
+
This layer represents a QLstm operation.
Definition: QLstmLayer.hpp:79
+
QLstmOptCifgParameters m_CifgParameters
Definition: QLstmLayer.hpp:84
+
QLstmOptPeepholeParameters m_PeepholeParameters
Definition: QLstmLayer.hpp:86
+
std::shared_ptr< ConstTensorHandle > m_ProjectionBias
A unique pointer to represent 1D weights tensor with dimensions [output_size] (int32).
Definition: QLstmLayer.hpp:43
+ +
std::shared_ptr< ConstTensorHandle > m_RecurrentToForgetWeights
A unique pointer to represent 2D weights tensor with dimensions [num_units, outputSize] (QSymmS8)...
Definition: QLstmLayer.hpp:24
+
+
+ + + + -- cgit v1.2.1