From 1dc83febfb76d6a770bdf3ba16c4034a970c2320 Mon Sep 17 00:00:00 2001 From: Nikhil Raj Date: Thu, 16 May 2024 09:47:51 +0100 Subject: IVGCVSW-8260 Update Doxgen Docu for 24.05 Signed-off-by: Nikhil Raj Change-Id: If4bc983bf2793a27ded8e26ac2b29523fc1e4711 --- latest/classarmnn_1_1_stack_layer.html | 157 +++++++++++++++++---------------- 1 file changed, 83 insertions(+), 74 deletions(-) (limited to 'latest/classarmnn_1_1_stack_layer.html') diff --git a/latest/classarmnn_1_1_stack_layer.html b/latest/classarmnn_1_1_stack_layer.html index 960fd63615..23c8d84d4e 100644 --- a/latest/classarmnn_1_1_stack_layer.html +++ b/latest/classarmnn_1_1_stack_layer.html @@ -36,7 +36,7 @@ ArmNN
-  24.02 +  24.05
@@ -488,7 +488,7 @@ Additional Inherited Members
27  return factory.CreateWorkload(LayerType::Stack, descriptor, PrepInfoAndDesc(descriptor));
28 }
-

References IWorkloadFactory::CreateWorkload(), LayerWithParameters< StackDescriptor >::PrepInfoAndDesc(), Layer::SetAdditionalInfo(), and armnn::Stack.

+

References IWorkloadFactory::CreateWorkload(), LayerWithParameters< StackDescriptor >::PrepInfoAndDesc(), Layer::SetAdditionalInfo(), and armnn::Stack.

@@ -520,10 +520,10 @@ Additional Inherited Members

Reimplemented from Layer.

-

Definition at line 98 of file StackLayer.cpp.

-
99 {
-
100  strategy.ExecuteStrategy(this, GetParameters(), {}, GetName());
-
101 }
+

Definition at line 107 of file StackLayer.cpp.

+
108 {
+
109  strategy.ExecuteStrategy(this, GetParameters(), {}, GetName());
+
110 }

References IStrategy::ExecuteStrategy(), Layer::GetName(), and LayerWithParameters< StackDescriptor >::GetParameters().

@@ -566,35 +566,39 @@ Additional Inherited Members

Definition at line 35 of file StackLayer.cpp.

36 {
-
37  IgnoreUnused(inputShapes);
-
38 
-
39  const TensorShape& inputShape = m_Param.m_InputShape;
-
40  const unsigned int inputNumDimensions = inputShape.GetNumDimensions();
-
41  const unsigned int axis = m_Param.m_Axis;
-
42 
-
43  ARMNN_ASSERT(axis <= inputNumDimensions);
-
44 
-
45  std::vector<unsigned int> dimensionSizes(inputNumDimensions + 1, 0);
-
46  for (unsigned int i = 0; i < axis; ++i)
-
47  {
-
48  dimensionSizes[i] = inputShape[i];
-
49  }
-
50 
-
51  dimensionSizes[axis] = m_Param.m_NumInputs;
-
52 
-
53  for (unsigned int i = axis + 1; i < inputNumDimensions + 1; ++i)
-
54  {
-
55  dimensionSizes[i] = inputShape[i-1];
-
56  }
-
57 
-
58  TensorShape targetShape = TensorShape(inputNumDimensions + 1, dimensionSizes.data());
-
59 
-
60  return std::vector<TensorShape>({ targetShape });
-
61 }
+
37  const TensorShape& inputShape = m_Param.m_InputShape;
+
38  const unsigned int inputNumDimensions = inputShape.GetNumDimensions();
+
39  const unsigned int axis = m_Param.m_Axis;
+
40 
+
41  if (axis > inputNumDimensions)
+
42  {
+
43  throw armnn::Exception("axis must not be greater than input dimensions (\""
+
44  + std::to_string(axis) +
+
45  "\" vs \""
+
46  + std::to_string(inputNumDimensions) + "\").");
+
47  }
+
48 
+
49  std::vector<unsigned int> dimensionSizes(inputNumDimensions + 1, 0);
+
50  for (unsigned int i = 0; i < axis; ++i)
+
51  {
+
52  dimensionSizes[i] = inputShape[i];
+
53  }
+
54 
+
55  dimensionSizes[axis] = m_Param.m_NumInputs;
+
56 
+
57  for (unsigned int i = axis + 1; i < inputNumDimensions + 1; ++i)
+
58  {
+
59  dimensionSizes[i] = inputShape[i-1];
+
60  }
+
61 
+
62  TensorShape targetShape = TensorShape(inputNumDimensions + 1, dimensionSizes.data());
+
63 
+
64  return std::vector<TensorShape>({ targetShape });
+
65 }
-

References ARMNN_ASSERT, TensorShape::GetNumDimensions(), armnn::IgnoreUnused(), StackDescriptor::m_Axis, StackDescriptor::m_InputShape, StackDescriptor::m_NumInputs, and LayerWithParameters< StackDescriptor >::m_Param.

+

References TensorShape::GetNumDimensions(), StackDescriptor::m_Axis, StackDescriptor::m_InputShape, StackDescriptor::m_NumInputs, and LayerWithParameters< StackDescriptor >::m_Param.

-

Referenced by StackLayer::ValidateTensorShapesFromInputs().

+

Referenced by StackLayer::ValidateTensorShapesFromInputs().

@@ -631,42 +635,47 @@ Additional Inherited Members

Implements Layer.

-

Definition at line 63 of file StackLayer.cpp.

-
64 {
-
65  // Validates Stack layer.
-
66  ConditionalThrowIfNotEqual<LayerValidationException>(
-
67  "StackLayer: Num Input Slots must match Num Inputs.",
- - -
70 
- -
72 
-
73  const TensorShape& outputShape = GetOutputSlot(0).GetTensorInfo().GetShape();
+

Definition at line 67 of file StackLayer.cpp.

+
68 {
+
69  // Validates Stack layer.
+
70  ConditionalThrowIfNotEqual<LayerValidationException>(
+
71  "StackLayer: Num Input Slots must match Num Inputs.",
+ +
74 
- +
76 
-
77  // Constructs and validates input shapes
-
78  std::vector<TensorShape> inputShapes;
-
79  for (unsigned int i = 0; i < GetNumInputSlots(); ++i)
-
80  {
-
81  TensorShape inputShape = GetInputSlot(i).GetTensorInfo().GetShape();
-
82  if (inputShape != m_Param.m_InputShape)
-
83  {
-
84  throw LayerValidationException("StackLayer: TensorShape set on InputSlot[" +
-
85  std::to_string(i) +
-
86  "] does not match defined input shape");
-
87  }
-
88  inputShapes.push_back(inputShape);
-
89  }
-
90 
-
91  auto inferredShapes = InferOutputShapes(inputShapes);
-
92 
-
93  ARMNN_ASSERT(inferredShapes.size() == 1);
+
77  const TensorShape& outputShape = GetOutputSlot(0).GetTensorInfo().GetShape();
+
78 
+ +
80 
+
81  // Constructs and validates input shapes
+
82  std::vector<TensorShape> inputShapes;
+
83  for (unsigned int i = 0; i < GetNumInputSlots(); ++i)
+
84  {
+
85  TensorShape inputShape = GetInputSlot(i).GetTensorInfo().GetShape();
+
86  if (inputShape != m_Param.m_InputShape)
+
87  {
+
88  throw LayerValidationException("StackLayer: TensorShape set on InputSlot[" +
+
89  std::to_string(i) +
+
90  "] does not match defined input shape");
+
91  }
+
92  inputShapes.push_back(inputShape);
+
93  }
94 
-
95  ValidateAndCopyShape(outputShape, inferredShapes[0], m_ShapeInferenceMethod, "StackLayer");
-
96 }
+
95  auto inferredShapes = InferOutputShapes(inputShapes);
+
96 
+
97  if (inferredShapes.size() != 1)
+
98  {
+
99  throw armnn::LayerValidationException("inferredShapes has "
+
100  + std::to_string(inferredShapes.size()) +
+
101  " elements - should only have 1.");
+
102  }
+
103 
+
104  ValidateAndCopyShape(outputShape, inferredShapes[0], m_ShapeInferenceMethod, "StackLayer");
+
105 }
-

References ARMNN_ASSERT, CHECK_LOCATION, Layer::GetInputSlot(), Layer::GetNumInputSlots(), Layer::GetOutputSlot(), TensorInfo::GetShape(), InputSlot::GetTensorInfo(), OutputSlot::GetTensorInfo(), StackLayer::InferOutputShapes(), StackDescriptor::m_InputShape, StackDescriptor::m_NumInputs, LayerWithParameters< StackDescriptor >::m_Param, Layer::m_ShapeInferenceMethod, Layer::ValidateAndCopyShape(), Layer::VerifyLayerConnections(), and Layer::VerifyShapeInferenceType().

+

References CHECK_LOCATION, Layer::GetInputSlot(), Layer::GetNumInputSlots(), Layer::GetOutputSlot(), TensorInfo::GetShape(), InputSlot::GetTensorInfo(), OutputSlot::GetTensorInfo(), StackLayer::InferOutputShapes(), StackDescriptor::m_InputShape, StackDescriptor::m_NumInputs, LayerWithParameters< StackDescriptor >::m_Param, Layer::m_ShapeInferenceMethod, Layer::ValidateAndCopyShape(), Layer::VerifyLayerConnections(), and Layer::VerifyShapeInferenceType().

@@ -676,36 +685,36 @@ Additional Inherited Members -
#define ARMNN_ASSERT(COND)
Definition: Assert.hpp:14
-
const TensorInfo & GetTensorInfo() const override
Definition: Layer.cpp:92
+
const TensorInfo & GetTensorInfo() const override
Definition: Layer.cpp:100
#define CHECK_LOCATION()
Definition: Exceptions.hpp:203
-
void ValidateAndCopyShape(const TensorShape &outputShape, const TensorShape &inferredShape, const ShapeInferenceMethod shapeInferenceMethod, const std::string &layerName, const unsigned int outputSlotIndex=0)
Definition: Layer.cpp:435
+
void ValidateAndCopyShape(const TensorShape &outputShape, const TensorShape &inferredShape, const ShapeInferenceMethod shapeInferenceMethod, const std::string &layerName, const unsigned int outputSlotIndex=0)
Definition: Layer.cpp:457
const OutputSlot & GetOutputSlot(unsigned int index=0) const override
Get the const output slot handle by slot index.
Definition: Layer.hpp:339
const InputSlot & GetInputSlot(unsigned int index) const override
Get a const input slot handle by slot index.
Definition: Layer.hpp:337
const StackDescriptor & GetParameters() const override
const char * GetName() const override
Returns the name of the layer.
Definition: Layer.hpp:332
-
const TensorInfo & GetTensorInfo() const override
Gets the TensorInfo for this InputSlot.
Definition: Layer.cpp:592
+
const TensorInfo & GetTensorInfo() const override
Gets the TensorInfo for this InputSlot.
Definition: Layer.cpp:614
uint32_t m_NumInputs
Number of input tensors.
StackDescriptor m_Param
The parameters for the layer (not including tensor-valued weights etc.).
unsigned int GetNumDimensions() const
Function that returns the tensor rank.
Definition: Tensor.cpp:174
WorkloadInfo PrepInfoAndDesc(QueueDescriptor &descriptor) const
Helper function to reduce duplication in *Layer::CreateWorkload.
uint32_t m_Axis
0-based axis along which to stack the input tensors.
-
void VerifyShapeInferenceType(const TensorShape &outputShape, ShapeInferenceMethod shapeInferenceMethod)
Definition: Layer.cpp:504
-
void SetAdditionalInfo(QueueDescriptor &descriptor) const
Definition: Layer.cpp:287
+ +
void VerifyShapeInferenceType(const TensorShape &outputShape, ShapeInferenceMethod shapeInferenceMethod)
Definition: Layer.cpp:526
+
void SetAdditionalInfo(QueueDescriptor &descriptor) const
Definition: Layer.cpp:303
+
Base class for all ArmNN exceptions so that users can filter to just those.
Definition: Exceptions.hpp:46
TensorShape m_InputShape
Required shape of all input tensors.
unsigned int GetNumInputSlots() const override
Returns the number of connectable input slots.
Definition: Layer.hpp:334
std::vector< TensorShape > InferOutputShapes(const std::vector< TensorShape > &inputShapes) const override
By default returns inputShapes if the number of inputs are equal to number of outputs,...
Definition: StackLayer.cpp:35
const TensorShape & GetShape() const
Definition: Tensor.hpp:193
-
void IgnoreUnused(Ts &&...)
-
void VerifyLayerConnections(unsigned int expectedConnections, const CheckLocation &location) const
Definition: Layer.cpp:391
+
void VerifyLayerConnections(unsigned int expectedConnections, const CheckLocation &location) const
Definition: Layer.cpp:410
LayerWithParameters(unsigned int numInputSlots, unsigned int numOutputSlots, LayerType type, const StackDescriptor &param, const char *name)
ShapeInferenceMethod m_ShapeInferenceMethod
Definition: Layer.hpp:441