ArmNN
 24.02
Descriptors.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
7 #include "Deprecated.hpp"
8 #include "DescriptorsFwd.hpp" // Required for class equivalence declarations.
9 #include "Tensor.hpp"
10 #include "Types.hpp"
11 #include <armnn/Exceptions.hpp>
12 
13 #include <cstdint>
14 #include <iterator>
15 #include <utility>
16 #include <vector>
17 
18 namespace armnn
19 {
20 
21 /// Base class for all descriptors.
23 {
24  virtual bool IsNull() const { return false; }
25  virtual ~BaseDescriptor() = default;
26 };
27 
28 /// Null Descriptor used as a return value from the IConnectableLayer GetParameters method
29 /// by layers which do not have a descriptor
31 {
32  bool IsNull() const override { return true; }
33 };
34 
35 /// An ActivationDescriptor for the ActivationLayer.
37 {
40  , m_A(0)
41  , m_B(0)
42  {}
43 
45  float a = 0,
46  float b = 0)
47  : m_Function(activation)
48  , m_A(a)
49  , m_B(b)
50  {}
51 
52  bool operator ==(const ActivationDescriptor &rhs) const
53  {
54  return m_Function == rhs.m_Function && m_A == rhs.m_B && m_B == rhs.m_B;
55  }
56 
57  /// @brief The activation function to use
58  /// (Sigmoid, TanH, Linear, ReLu, BoundedReLu, SoftReLu, LeakyReLu, Abs, Sqrt, Square, Elu).
60  /// Alpha upper bound value used by the activation functions. (BoundedReLu, Linear, TanH, Elu).
61  float m_A;
62  /// Beta lower bound value used by the activation functions. (BoundedReLu, Linear, TanH).
63  float m_B;
64 };
65 
66 /// An ArgMinMaxDescriptor for ArgMinMaxLayer
68 {
71  , m_Axis(-1)
73  {}
74 
75  bool operator ==(const ArgMinMaxDescriptor &rhs) const
76  {
77  return m_Function == rhs.m_Function && m_Axis == rhs.m_Axis && m_Output_Type == rhs.m_Output_Type;
78  }
79 
80  /// Specify if the function is to find Min or Max.
82  /// Axis to reduce across the input tensor.
83  int m_Axis;
84  /// Deprecated and will be removed in future release.
86 };
87 
88 /// A ComparisonDescriptor for the ComparisonLayer
90 {
93  {}
94 
96  : m_Operation(operation)
97  {}
98 
99  bool operator ==(const ComparisonDescriptor &rhs) const
100  {
101  return m_Operation == rhs.m_Operation;
102  }
103 
104  /// Specifies the comparison operation to execute
106 };
107 
108 /// A ElementwiseBinaryDescriptor for the ElementwiseBinaryLayer
110 {
113  {}
114 
116  : m_Operation(operation)
117  {}
118 
120  {
121  return m_Operation == rhs.m_Operation;
122  }
123 
124  /// Specifies the elementwiseBinary operation to execute
126 };
127 
128 /// A ElementwiseUnaryDescriptor for the ElementwiseUnaryLayer
130 {
133  {}
134 
136  : m_Operation(operation)
137  {}
138 
140  {
141  return m_Operation == rhs.m_Operation;
142  }
143 
144  /// Specifies the elementwiseUnary operation to execute
146 };
147 
148 /// A PermuteDescriptor for the PermuteLayer.
150 {
152  : m_DimMappings{}
153  {}
154 
156  : m_DimMappings(dimMappings)
157  {}
158 
159  bool operator ==(const PermuteDescriptor &rhs) const
160  {
161  return m_DimMappings.IsEqual(rhs.m_DimMappings);
162  }
163 
164  /// @brief Indicates how to translate tensor elements from a given source into the target destination, when
165  /// source and target potentially have different memory layouts e.g.
166  /// Input Shape {1, 1, 4, 4}
167  /// Permutation Vector {0, 2, 3, 1}
168  /// Output Shape {1, 4, 1, 4}
169  /// dim "0" goes into index 0 ([ 1, X, X, X ])
170  /// dim "1" goes into index 2 ([ 1, X, 1, X ])
171  /// dim "2" goes into index 3 ([ 1, X, 1, 4 ])
172  /// dim "3" goes into index 1 ([ 1, 4, 1, 4 ])
174 };
175 
176 /// A SoftmaxDescriptor for the SoftmaxLayer.
178 {
180  : m_Beta(1.0f)
181  , m_Axis(-1)
182  {}
183 
184  bool operator ==(const SoftmaxDescriptor& rhs) const
185  {
186  return m_Beta == rhs.m_Beta && m_Axis == rhs.m_Axis;
187  }
188 
189  /// Exponentiation value.
190  float m_Beta;
191  /// Scalar, defaulted to the last index (-1), specifying the dimension the activation will be performed on.
192  int m_Axis;
193 };
194 
195 /// A LogSoftmaxDescriptor for the LogSoftmaxLayer
197 
198 /// @brief An OriginsDescriptor for the ConcatLayer.
199 /// Descriptor to configure the concatenation process. Number of views must be equal to the number of inputs, and
200 /// their order must match - e.g. first view corresponds to the first input, second view to the second input, etc.
202 {
204  OriginsDescriptor(uint32_t numViews, uint32_t numDimensions = 4);
205  OriginsDescriptor(const OriginsDescriptor& other);
207 
209 
211 
212  bool operator ==(const OriginsDescriptor& rhs) const;
213 
214  /// @Brief Set the view origin coordinates. The arguments are: view, dimension, value.
215  /// If the view is greater than or equal to GetNumViews(), then the view argument is out of range.
216  /// If the coord is greater than or equal to GetNumDimensions(), then the coord argument is out of range.
217  Status SetViewOriginCoord(uint32_t view, uint32_t coord, uint32_t value);
218  /// Get the number of views.
219  uint32_t GetNumViews() const;
220  /// Get the number of dimensions.
221  uint32_t GetNumDimensions() const;
222  /// Return the view origin at the int value idx.
223  const uint32_t* GetViewOrigin(uint32_t idx) const;
224  /// @brief Reorders the viewOrigins in accordance with the indices presented in newOrdering array.
225  /// The number of views must match number of elements in the new ordering array.
226  void ReorderOrigins(unsigned int* newOrdering, unsigned int numNewOrdering);
227  /// Swap the ViewsDescriptor values first and second.
228  friend void swap(OriginsDescriptor& first, OriginsDescriptor& second);
229  /// Set the concatenation axis value.
230  void SetConcatAxis(unsigned int concatAxis);
231  /// Get the concatenation axis value.
232  unsigned int GetConcatAxis() const;
233 
234 private:
235  unsigned int m_ConcatAxis;
236  uint32_t m_NumViews;
237  uint32_t m_NumDimensions;
238  uint32_t** m_ViewOrigins;
239 };
240 
241 /// @brief A ViewsDescriptor for the SplitterLayer.
242 /// Descriptor to configure the splitting process. Number of Views must be equal to the number of outputs, and
243 /// their order must match - e.g. first view corresponds to the first output, second view to the second output, etc.
245 {
246  ViewsDescriptor(uint32_t numViews, uint32_t numDimensions = 4);
247  ViewsDescriptor(const ViewsDescriptor& other);
248  ViewsDescriptor();
250 
252 
254 
255  bool operator ==(const ViewsDescriptor& rhs) const;
256 
257  /// @Brief Set the view origin coordinates. The arguments are: view, dimension, value.
258  /// If the view is greater than or equal to GetNumViews(), then the view argument is out of range.
259  /// If the coord is greater than or equal to GetNumDimensions(), then the coord argument is out of range.
260  Status SetViewOriginCoord(uint32_t view, uint32_t coord, uint32_t value);
261  /// @brief Set the size of the views. The arguments are: view, dimension, value.
262  /// If the view is greater than or equal to GetNumViews(), then the view argument is out of range.
263  /// If the coord is greater than or equal to GetNumDimensions(), then the coord argument is out of range.
264  Status SetViewSize(uint32_t view, uint32_t coord, uint32_t value);
265 
266  /// Get the number of views.
267  uint32_t GetNumViews() const;
268  /// Get the number of dimensions.
269  uint32_t GetNumDimensions() const;
270  /// Get the view origin at the int value idx.
271  const uint32_t* GetViewOrigin(uint32_t idx) const;
272  /// Get the view sizes at the int value idx.
273  const uint32_t* GetViewSizes(uint32_t idx) const;
274  /// Get the View Origins
275  const OriginsDescriptor& GetOrigins() const;
276 
277  /// Swap the ViewsDescriptor value first and second.
278  friend void swap(ViewsDescriptor& first, ViewsDescriptor& second);
279 
280  /// Set the axis value.
281  void SetAxis(int32_t axis);
282 
283  /// Get the axis value.
284  int32_t GetAxis() const;
285 
286  /// Returns true if an axis has been set.
287  bool HasAxis() const;
288 
289 private:
290  OriginsDescriptor m_Origins;
291  uint32_t** m_ViewSizes;
292  bool m_IsAxisSet = false;
293  int32_t m_Axis = 0;
294 };
295 
296 
297 /// @brief Convenience template to create an OriginsDescriptor to use when creating a ConcatLayer for performing
298 /// concatenation of a number of input tensors.
299 template <typename TensorShapeIt>
301  TensorShapeIt last,
302  unsigned int concatenationDimension)
303 {
304  auto numInputs = std::distance(first, last);
305 
306  if (numInputs < 2)
307  {
308  throw InvalidArgumentException("Concatenation requires at least 2 inputs");
309  }
310 
311  const auto& firstInputShape = *first;
312 
313  const unsigned int numDimensions = firstInputShape.GetNumDimensions();
314  for (auto it = first + 1; it != last; ++it)
315  {
316  if (it->GetNumDimensions() != numDimensions)
317  {
318  throw InvalidArgumentException("All inputs to concatenation must have the same number of dimensions");
319  }
320  }
321 
322  if (concatenationDimension >= numDimensions)
323  {
324  throw InvalidArgumentException("concatenationDimension must be between 0 and the number of dimensions.");
325  }
326 
327  for (auto it = first; it != last; ++it)
328  {
329  for (unsigned int d = 0; d < numDimensions; ++d)
330  {
331  const bool dimSizeOk = (d == concatenationDimension) || (firstInputShape[d] == (*it)[d]);
332  if (!dimSizeOk)
333  {
334  throw InvalidArgumentException("All inputs to concatenation must be the same size along all dimensions "
335  " except the concatenation dimension");
336  }
337  }
338  }
339 
340  OriginsDescriptor viewsDescriptor(static_cast<uint32_t>(numInputs), numDimensions);
341  viewsDescriptor.SetConcatAxis(concatenationDimension);
342 
343  uint32_t viewIndex = 0u;
344  uint32_t coordAlongConcatDim = 0u;
345  for (auto it = first; it != last; ++it)
346  {
347  const auto& inputShape = *it;
348 
349  for (unsigned int i = 0; i < concatenationDimension; ++i)
350  {
351  viewsDescriptor.SetViewOriginCoord(viewIndex, i, 0);
352  }
353 
354  viewsDescriptor.SetViewOriginCoord(viewIndex, concatenationDimension, coordAlongConcatDim);
355  unsigned int dimSize = inputShape[concatenationDimension];
356  coordAlongConcatDim += dimSize;
357 
358 
359  for (unsigned int i = concatenationDimension + 1; i < numDimensions; ++i)
360  {
361  viewsDescriptor.SetViewOriginCoord(viewIndex, i, 0);
362  }
363 
364  ++viewIndex;
365  }
366 
367  return viewsDescriptor;
368 }
369 
370 /// A Pooling2dDescriptor for the Pooling2dLayer.
372 {
375  , m_PadLeft(0)
376  , m_PadRight(0)
377  , m_PadTop(0)
378  , m_PadBottom(0)
379  , m_PoolWidth(0)
380  , m_PoolHeight(0)
381  , m_StrideX(0)
382  , m_StrideY(0)
386  {}
387 
388  bool operator ==(const Pooling2dDescriptor& rhs) const
389  {
390  return m_PoolType == rhs.m_PoolType &&
391  m_PadLeft == rhs.m_PadLeft &&
392  m_PadRight == rhs.m_PadRight &&
393  m_PadTop == rhs.m_PadTop &&
394  m_PadBottom == rhs.m_PadBottom &&
395  m_PoolWidth == rhs.m_PoolWidth &&
396  m_PoolHeight == rhs.m_PoolHeight &&
397  m_StrideX == rhs.m_StrideX &&
398  m_StrideY == rhs.m_StrideY &&
401  m_DataLayout == rhs.m_DataLayout;
402  }
403 
404  /// The pooling algorithm to use (Max. Average, L2).
406  /// Padding left value in the width dimension.
407  uint32_t m_PadLeft;
408  /// Padding right value in the width dimension.
409  uint32_t m_PadRight;
410  /// Padding top value in the height dimension.
411  uint32_t m_PadTop;
412  /// Padding bottom value in the height dimension.
413  uint32_t m_PadBottom;
414  /// Pooling width value.
415  uint32_t m_PoolWidth;
416  /// Pooling height value.
417  uint32_t m_PoolHeight;
418  /// Stride value when proceeding through input for the width dimension.
419  uint32_t m_StrideX;
420  /// Stride value when proceeding through input for the height dimension.
421  uint32_t m_StrideY;
422  /// The rounding method for the output shape. (Floor, Ceiling).
424  /// The padding method to be used. (Exclude, IgnoreValue).
426  /// The data layout to be used (NCHW, NHWC).
428 };
429 
430 /// A Pooling3dDescriptor for the Pooling3dLayer.
432 {
435  , m_PadLeft(0)
436  , m_PadRight(0)
437  , m_PadTop(0)
438  , m_PadBottom(0)
439  , m_PadFront(0)
440  , m_PadBack(0)
441  , m_PoolWidth(0)
442  , m_PoolHeight(0)
443  , m_PoolDepth(0)
444  , m_StrideX(0)
445  , m_StrideY(0)
446  , m_StrideZ(0)
450  {}
451 
452  bool operator ==(const Pooling3dDescriptor& rhs) const
453  {
454  return m_PoolType == rhs.m_PoolType &&
455  m_PadLeft == rhs.m_PadLeft &&
456  m_PadRight == rhs.m_PadRight &&
457  m_PadTop == rhs.m_PadTop &&
458  m_PadBottom == rhs.m_PadBottom &&
459  m_PadFront == rhs.m_PadFront &&
460  m_PadBack == rhs.m_PadBack &&
461  m_PoolWidth == rhs.m_PoolWidth &&
462  m_PoolHeight == rhs.m_PoolHeight &&
463  m_PoolDepth == rhs.m_PoolDepth &&
464  m_StrideX == rhs.m_StrideX &&
465  m_StrideY == rhs.m_StrideY &&
466  m_StrideZ == rhs.m_StrideZ &&
469  m_DataLayout == rhs.m_DataLayout;
470  }
471 
472  /// The pooling algorithm to use (Max. Average, L2).
474  /// Padding left value in the width dimension.
475  uint32_t m_PadLeft;
476  /// Padding right value in the width dimension.
477  uint32_t m_PadRight;
478  /// Padding top value in the height dimension.
479  uint32_t m_PadTop;
480  /// Padding bottom value in the height dimension.
481  uint32_t m_PadBottom;
482  /// Padding front value in the depth dimension.
483  uint32_t m_PadFront;
484  /// Padding back value in the depth dimension.
485  uint32_t m_PadBack;
486  /// Pooling width value.
487  uint32_t m_PoolWidth;
488  /// Pooling height value.
489  uint32_t m_PoolHeight;
490  /// Pooling depth value.
491  uint32_t m_PoolDepth;
492  /// Stride value when proceeding through input for the width dimension.
493  uint32_t m_StrideX;
494  /// Stride value when proceeding through input for the height dimension.
495  uint32_t m_StrideY;
496  /// Stride value when proceeding through input for the depth dimension.
497  uint32_t m_StrideZ;
498  /// The rounding method for the output shape. (Floor, Ceiling).
500  /// The padding method to be used. (Exclude, IgnoreValue).
502  /// The data layout to be used (NCDHW, NDHWC).
504 };
505 
506 /// A FullyConnectedDescriptor for the FullyConnectedLayer.
508 {
510  : m_BiasEnabled(false)
511  , m_TransposeWeightMatrix(false)
512  , m_ConstantWeights(true)
513  {}
514 
515  bool operator ==(const FullyConnectedDescriptor& rhs) const
516  {
517  return m_BiasEnabled == rhs.m_BiasEnabled
520  }
521 
522  /// Get the number of inputs.
523  uint32_t GetNumInputs() const;
524 
525  /// Enable/disable bias.
527  /// Enable/disable transpose weight matrix.
529  /// Enable/disable constant weights and biases.
531 };
532 
533 /// A Convolution2dDescriptor for the Convolution2dLayer.
535 {
537  : m_PadLeft(0)
538  , m_PadRight(0)
539  , m_PadTop(0)
540  , m_PadBottom(0)
541  , m_StrideX(1)
542  , m_StrideY(1)
543  , m_DilationX(1)
544  , m_DilationY(1)
545  , m_BiasEnabled(false)
547  {}
548 
549  bool operator ==(const Convolution2dDescriptor& rhs) const
550  {
551  return m_PadLeft == rhs.m_PadLeft &&
552  m_PadRight == rhs.m_PadRight &&
553  m_PadTop == rhs.m_PadTop &&
554  m_PadBottom == rhs.m_PadBottom &&
555  m_StrideX == rhs.m_StrideX &&
556  m_StrideY == rhs.m_StrideY &&
557  m_DilationX == rhs.m_DilationX &&
558  m_DilationY == rhs.m_DilationY &&
559  m_BiasEnabled == rhs.m_BiasEnabled &&
560  m_DataLayout == rhs.m_DataLayout;
561  }
562  uint32_t GetNumInputs() const;
563 
564 
565  /// Padding left value in the width dimension.
566  uint32_t m_PadLeft;
567  /// Padding right value in the width dimension.
568  uint32_t m_PadRight;
569  /// Padding top value in the height dimension.
570  uint32_t m_PadTop;
571  /// Padding bottom value in the height dimension.
572  uint32_t m_PadBottom;
573  /// Stride value when proceeding through input for the width dimension.
574  uint32_t m_StrideX;
575  /// Stride value when proceeding through input for the height dimension.
576  uint32_t m_StrideY;
577  /// Dilation along x axis
578  uint32_t m_DilationX;
579  /// Dilation along y axis
580  uint32_t m_DilationY;
581  /// Enable/disable bias.
583  /// The data layout to be used (NCHW, NHWC).
585 };
586 
587 /// A Convolution3dDescriptor for the Convolution3dLayer.
589 {
591  : m_PadLeft(0)
592  , m_PadRight(0)
593  , m_PadTop(0)
594  , m_PadBottom(0)
595  , m_PadFront(0)
596  , m_PadBack(0)
597  , m_StrideX(1)
598  , m_StrideY(1)
599  , m_StrideZ(1)
600  , m_DilationX(1)
601  , m_DilationY(1)
602  , m_DilationZ(1)
603  , m_BiasEnabled(false)
605  {}
606 
607  bool operator ==(const Convolution3dDescriptor& rhs) const
608  {
609  return m_PadLeft == rhs.m_PadLeft &&
610  m_PadRight == rhs.m_PadRight &&
611  m_PadTop == rhs.m_PadTop &&
612  m_PadBottom == rhs.m_PadBottom &&
613  m_PadFront == rhs.m_PadFront &&
614  m_PadBack == rhs.m_PadBack &&
615  m_StrideX == rhs.m_StrideX &&
616  m_StrideY == rhs.m_StrideY &&
617  m_StrideZ == rhs.m_StrideZ &&
618  m_DilationX == rhs.m_DilationX &&
619  m_DilationY == rhs.m_DilationY &&
620  m_DilationZ == rhs.m_DilationZ &&
621  m_BiasEnabled == rhs.m_BiasEnabled &&
622  m_DataLayout == rhs.m_DataLayout;
623  }
624 
625  /// Get the number of views/inputs.
626  uint32_t GetNumInputs() const;
627 
628  /// Padding left value in the width dimension.
629  uint32_t m_PadLeft;
630  /// Padding right value in the width dimension.
631  uint32_t m_PadRight;
632  /// Padding top value in the height dimension.
633  uint32_t m_PadTop;
634  /// Padding bottom value in the height dimension.
635  uint32_t m_PadBottom;
636  /// Padding front value in the depth dimension.
637  uint32_t m_PadFront;
638  /// Padding back value in the depth dimension.
639  uint32_t m_PadBack;
640  /// Stride value when proceeding through input for the width dimension.
641  uint32_t m_StrideX;
642  /// Stride value when proceeding through input for the height dimension.
643  uint32_t m_StrideY;
644  /// Stride value when proceeding through input for the depth dimension.
645  uint32_t m_StrideZ;
646  /// Dilation along x axis
647  uint32_t m_DilationX;
648  /// Dilation along y axis
649  uint32_t m_DilationY;
650  /// Dilation along z axis
651  uint32_t m_DilationZ;
652  /// Enable/disable bias.
654  /// The data layout to be used (NDHWC, NCDHW).
656 };
657 
658 /// A DepthwiseConvolution2dDescriptor for the DepthwiseConvolution2dLayer.
660 {
662  : m_PadLeft(0)
663  , m_PadRight(0)
664  , m_PadTop(0)
665  , m_PadBottom(0)
666  , m_StrideX(1)
667  , m_StrideY(1)
668  , m_DilationX(1)
669  , m_DilationY(1)
670  , m_BiasEnabled(false)
672  {}
673 
675  {
676  return m_PadLeft == rhs.m_PadLeft &&
677  m_PadRight == rhs.m_PadRight &&
678  m_PadTop == rhs.m_PadTop &&
679  m_PadBottom == rhs.m_PadBottom &&
680  m_StrideX == rhs.m_StrideX &&
681  m_StrideY == rhs.m_StrideY &&
682  m_DilationX == rhs.m_DilationX &&
683  m_DilationY == rhs.m_DilationY &&
684  m_BiasEnabled == rhs.m_BiasEnabled &&
685  m_DataLayout == rhs.m_DataLayout;
686  }
687 
688  /// Get the number of views/inputs.
689  uint32_t GetNumInputs() const;
690 
691  /// Padding left value in the width dimension.
692  uint32_t m_PadLeft;
693  /// Padding right value in the width dimension.
694  uint32_t m_PadRight;
695  /// Padding top value in the height dimension.
696  uint32_t m_PadTop;
697  /// Padding bottom value in the height dimension.
698  uint32_t m_PadBottom;
699  /// Stride value when proceeding through input for the width dimension.
700  uint32_t m_StrideX;
701  /// Stride value when proceeding through input for the height dimension.
702  uint32_t m_StrideY;
703  /// Dilation factor value for width dimension.
704  uint32_t m_DilationX;
705  /// Dilation factor value for height dimension.
706  uint32_t m_DilationY;
707  /// Enable/disable bias.
709  /// The data layout to be used (NCHW, NHWC).
711 };
712 
714 {
716  : m_MaxDetections(0)
720  , m_NmsIouThreshold(0)
721  , m_NumClasses(0)
722  , m_UseRegularNms(false)
723  , m_ScaleX(0)
724  , m_ScaleY(0)
725  , m_ScaleW(0)
726  , m_ScaleH(0)
727  {}
728 
730  {
731  return m_MaxDetections == rhs.m_MaxDetections &&
736  m_NumClasses == rhs.m_NumClasses &&
738  m_ScaleX == rhs.m_ScaleX &&
739  m_ScaleY == rhs.m_ScaleY &&
740  m_ScaleW == rhs.m_ScaleW &&
741  m_ScaleH == rhs.m_ScaleH;
742  }
743 
744  /// Maximum numbers of detections.
745  uint32_t m_MaxDetections;
746  /// Maximum numbers of classes per detection, used in Fast NMS.
748  /// Detections per classes, used in Regular NMS.
750  /// NMS score threshold.
752  /// Intersection over union threshold.
754  /// Number of classes.
755  uint32_t m_NumClasses;
756  /// Use Regular NMS.
758  /// Center size encoding scale x.
759  float m_ScaleX;
760  /// Center size encoding scale y.
761  float m_ScaleY;
762  /// Center size encoding scale weight.
763  float m_ScaleW;
764  /// Center size encoding scale height.
765  float m_ScaleH;
766 };
767 
768 /// A NormalizationDescriptor for the NormalizationLayer.
770 {
774  , m_NormSize(0)
775  , m_Alpha(0.f)
776  , m_Beta(0.f)
777  , m_K(0.f)
779  {}
780 
781  bool operator ==(const NormalizationDescriptor& rhs) const
782  {
783  return m_NormChannelType == rhs.m_NormChannelType &&
785  m_NormSize == rhs.m_NormSize &&
786  m_Alpha == rhs.m_Alpha &&
787  m_Beta == rhs.m_Beta &&
788  m_K == rhs.m_K &&
789  m_DataLayout == rhs.m_DataLayout;
790  }
791 
792  /// Normalization channel algorithm to use (Across, Within).
794  /// Normalization method algorithm to use (LocalBrightness, LocalContrast).
796  /// Depth radius value.
797  uint32_t m_NormSize;
798  /// Alpha value for the normalization equation.
799  float m_Alpha;
800  /// Beta value for the normalization equation.
801  float m_Beta;
802  /// Kappa value used for the across channel normalization equation.
803  float m_K;
804  /// The data layout to be used (NCHW, NHWC).
806 };
807 
808 /// A L2NormalizationDescriptor for the L2NormalizationLayer.
810 {
812  : m_Eps(1e-12f)
814  {}
815 
816  bool operator ==(const L2NormalizationDescriptor& rhs) const
817  {
818  return m_Eps == rhs.m_Eps && m_DataLayout == rhs.m_DataLayout;
819  }
820 
821  /// Used to avoid dividing by zero.
822  float m_Eps;
823  /// The data layout to be used (NCHW, NHWC).
825 };
826 
827 /// A BatchNormalizationDescriptor for the BatchNormalizationLayer.
829 {
831  : m_Eps(0.0001f)
833  {}
834 
836  {
837  return m_Eps == rhs.m_Eps && m_DataLayout == rhs.m_DataLayout;
838  }
839 
840  /// Value to add to the variance. Used to avoid dividing by zero.
841  float m_Eps;
842  /// The data layout to be used (NCHW, NHWC).
844 };
845 
846 /// An InstanceNormalizationDescriptor for InstanceNormalizationLayer
848 {
850  : m_Gamma(1.0f)
851  , m_Beta(0.0f)
852  , m_Eps(1e-12f)
854  {}
855 
857  {
858  return m_Gamma == rhs.m_Gamma &&
859  m_Beta == rhs.m_Beta &&
860  m_Eps == rhs.m_Eps &&
861  m_DataLayout == rhs.m_DataLayout;
862  }
863 
864  /// Gamma, the scale scalar value applied for the normalized tensor. Defaults to 1.0.
865  float m_Gamma;
866  /// Beta, the offset scalar value applied for the normalized tensor. Defaults to 1.0.
867  float m_Beta;
868  /// Epsilon, small scalar value added to variance to avoid dividing by zero. Defaults to 1e-12f.
869  float m_Eps;
870  /// The data layout to be used (NCHW, NHWC).
872 };
873 
874 /// A BatchToSpaceNdDescriptor for the BatchToSpaceNdLayer.
876 {
878  : m_BlockShape({1, 1})
879  , m_Crops({{0, 0}, {0, 0}})
881  {}
882 
883  BatchToSpaceNdDescriptor(std::vector<unsigned int> blockShape,
884  std::vector<std::pair<unsigned int, unsigned int>> crops)
885  : m_BlockShape(blockShape)
886  , m_Crops(crops)
888  {}
889 
890  bool operator ==(const BatchToSpaceNdDescriptor& rhs) const
891  {
892  return m_BlockShape == rhs.m_BlockShape &&
893  m_Crops == rhs.m_Crops &&
894  m_DataLayout == rhs.m_DataLayout;
895  }
896 
897  /// Block shape values.
898  std::vector<unsigned int> m_BlockShape;
899  /// The values to crop from the input dimension.
900  std::vector<std::pair<unsigned int, unsigned int>> m_Crops;
901  /// The data layout to be used (NCHW, NHWC).
903 };
904 
905 /// A FakeQuantizationDescriptor for the FakeQuantizationLayer.
907 {
909  : m_Min(-6.0f)
910  , m_Max(6.0f)
911  {}
912 
914  {
915  return m_Min == rhs.m_Min && m_Max == rhs.m_Max;
916  }
917 
918  /// Minimum value.
919  float m_Min;
920  /// Maximum value.
921  float m_Max;
922 };
923 
924 /// A FillDescriptor for the FillLayer
926 {
928  : m_Value(0)
929  {}
930 
931  FillDescriptor(const float& value)
932  : m_Value(value)
933  {}
934 
935  bool operator ==(const FillDescriptor& rhs) const
936  {
937  return m_Value == rhs.m_Value;
938  }
939 
940  float m_Value;
941 };
942 
943 /// A FusedDescriptor for the FusedLayer.
945 {
946  FusedDescriptor(unsigned int numInputSlots = 4u,
947  unsigned int numOutputSlots = 2u,
949  : m_NumInputSlots(numInputSlots), m_NumOutputSlots(numOutputSlots), m_FusedKernelType(fusedType)
950  {}
951 
952  bool operator ==(const FusedDescriptor& rhs) const
953  {
954  return m_NumInputSlots == rhs.m_NumInputSlots &&
957  }
958 
959  unsigned int m_NumInputSlots;
960  unsigned int m_NumOutputSlots;
962 };
963 
964 /// A GatherDescriptor for the GatherLayer.
966 {
968  : m_Axis(0)
969  {}
970 
971  GatherDescriptor(int32_t axis)
972  : m_Axis(axis)
973  {}
974 
975  bool operator ==(const GatherDescriptor& rhs) const
976  {
977  return m_Axis == rhs.m_Axis;
978  }
979 
980  /// The axis in params to gather indices from
981  int32_t m_Axis;
982 };
983 
984 /// A ResizeDescriptor for the ResizeLayer.
986 {
988  : m_TargetWidth(0)
989  , m_TargetHeight(0)
992  , m_AlignCorners(false)
993  , m_HalfPixelCenters(false)
994  {}
995 
996  bool operator ==(const ResizeDescriptor& rhs) const
997  {
998  return m_TargetWidth == rhs.m_TargetWidth &&
1000  m_Method == rhs.m_Method &&
1001  m_DataLayout == rhs.m_DataLayout &&
1002  m_AlignCorners == rhs.m_AlignCorners &&
1004  }
1005 
1006  /// Target width value.
1007  uint32_t m_TargetWidth;
1008  /// Target height value.
1009  uint32_t m_TargetHeight;
1010  /// The Interpolation method to use
1011  /// (Bilinear, NearestNeighbor).
1013  /// The data layout to be used (NCHW, NHWC).
1015  /// Aligned corners
1017  /// Half Pixel Centers
1019 };
1020 
1021 
1022 /// A ReshapeDescriptor for the ReshapeLayer.
1024 {
1026  : m_TargetShape()
1027  {}
1028 
1030  : m_TargetShape(shape)
1031  {}
1032 
1033  bool operator ==(const ReshapeDescriptor& rhs) const
1034  {
1035  return m_TargetShape == rhs.m_TargetShape;
1036  }
1037 
1038  /// Target shape value.
1040 };
1041 
1042 /// A SpaceToBatchNdDescriptor for the SpaceToBatchNdLayer.
1044 {
1046  : m_BlockShape({1, 1})
1047  , m_PadList({{0, 0}, {0, 0}})
1049  {}
1050 
1051  SpaceToBatchNdDescriptor(const std::vector<unsigned int>& blockShape,
1052  const std::vector<std::pair<unsigned int, unsigned int>>& padList)
1053  : m_BlockShape(blockShape)
1054  , m_PadList(padList)
1056  {}
1057 
1058  bool operator ==(const SpaceToBatchNdDescriptor& rhs) const
1059  {
1060  return m_BlockShape == rhs.m_BlockShape &&
1061  m_PadList == rhs.m_PadList &&
1062  m_DataLayout == rhs.m_DataLayout;
1063  }
1064 
1065  /// Block shape value.
1066  std::vector<unsigned int> m_BlockShape;
1067  /// @brief Specifies the padding values for the input dimension:
1068  /// heightPad{top, bottom} widthPad{left, right}.
1069  std::vector<std::pair<unsigned int, unsigned int>> m_PadList;
1070  /// The data layout to be used (NCHW, NHWC).
1072 };
1073 
1074 /// A SpaceToDepthDescriptor for the SpaceToDepthLayer
1076 {
1079  {}
1080 
1081  SpaceToDepthDescriptor(unsigned int blockSize, DataLayout dataLayout)
1082  : m_BlockSize(blockSize)
1083  , m_DataLayout(dataLayout)
1084  {}
1085 
1086  bool operator ==(const SpaceToDepthDescriptor& rhs) const
1087  {
1088  return m_BlockSize == rhs.m_BlockSize && m_DataLayout == rhs.m_DataLayout;
1089  }
1090 
1091  /// Scalar specifying the input block size. It must be >= 1
1092  unsigned int m_BlockSize;
1093 
1094  /// The data layout to be used (NCHW, NHWC).
1096 };
1097 
1098 /// A DepthToSpaceDescriptor for the DepthToSpaceLayer
1100 
1101 /// An LstmDescriptor for the LstmLayer.
1103 {
1105  : m_ActivationFunc(1) // 0: None, 1: Relu, 3: Relu6, 4: Tanh, 6: Sigmoid
1106  , m_ClippingThresCell(0.0)
1107  , m_ClippingThresProj(0.0)
1108  , m_CifgEnabled(true)
1109  , m_PeepholeEnabled(false)
1110  , m_ProjectionEnabled(false)
1111  , m_LayerNormEnabled(false)
1112  , m_TimeMajor(false)
1118  , m_HiddenStateScale(0.0)
1119  {}
1120 
1121  bool operator ==(const LstmDescriptor& rhs) const
1122  {
1123  return m_ActivationFunc == rhs.m_ActivationFunc &&
1126  m_CifgEnabled == rhs.m_CifgEnabled &&
1129  m_TimeMajor == rhs.m_TimeMajor &&
1136  }
1137 
1138  /// @brief The activation function to use.
1139  /// 0: None, 1: Relu, 3: Relu6, 4: Tanh, 6: Sigmoid.
1141  /// Clipping threshold value for the cell state.
1143  /// Clipping threshold value for the projection.
1145  /// Enable/disable cifg (coupled input & forget gate).
1147  /// Enable/disable peephole.
1149  /// Enable/disable the projection layer.
1151  /// Enable/disable layer normalization
1153  /// Enable/disable time major
1155  /// Input intermediate quantization scale
1157  /// Forget intermediate quantization scale
1159  /// Cell intermediate quantization scale
1161  /// Output intermediate quantization scale
1163  /// Hidden State zero point
1165  /// Hidden State quantization scale
1167 };
1168 
1170 
1171 /// A MeanDescriptor for the MeanLayer.
1173 {
1175  : m_Axis()
1176  , m_KeepDims(false)
1177  {}
1178 
1179  MeanDescriptor(const std::vector<unsigned int>& axis, bool keepDims)
1180  : m_Axis(axis)
1181  , m_KeepDims(keepDims)
1182  {}
1183 
1184  bool operator ==(const MeanDescriptor& rhs) const
1185  {
1186  return m_Axis == rhs.m_Axis && m_KeepDims == rhs.m_KeepDims;
1187  }
1188 
1189  /// Values for the dimensions to reduce.
1190  std::vector<unsigned int> m_Axis;
1191  /// Enable/disable keep dimensions. If true, then the reduced dimensions that are of length 1 are kept.
1193 };
1194 
1195 /// A PadDescriptor for the PadLayer.
1197 {
1199  {}
1200 
1201  PadDescriptor(const std::vector<std::pair<unsigned int, unsigned int>>& padList,
1202  const float& padValue = 0,
1203  const PaddingMode& paddingMode = PaddingMode::Constant)
1204  : m_PadList(padList)
1205  , m_PadValue(padValue)
1206  , m_PaddingMode(paddingMode)
1207  {}
1208 
1209  bool operator ==(const PadDescriptor& rhs) const
1210  {
1211  return m_PadList == rhs.m_PadList && m_PadValue == rhs.m_PadValue && m_PaddingMode == rhs.m_PaddingMode;
1212  }
1213 
1214  /// @brief Specifies the padding for input dimension.
1215  /// First is the number of values to add before the tensor in the dimension.
1216  /// Second is the number of values to add after the tensor in the dimension.
1217  /// The number of pairs should match the number of dimensions in the input tensor.
1218  std::vector<std::pair<unsigned int, unsigned int>> m_PadList;
1219 
1220  /// Optional value to use for padding, defaults to 0
1221  float m_PadValue;
1222 
1223  /// Specifies the Padding mode (Constant, Reflect or Symmetric)
1225 };
1226 
1227 /// A SliceDescriptor for the SliceLayer.
1229 {
1230  SliceDescriptor(const std::vector<unsigned int>& begin, const std::vector<unsigned int>& size)
1231  : m_Begin(begin)
1232  , m_Size(size)
1233  {}
1234 
1236  {}
1237 
1238  bool operator ==(const SliceDescriptor& rhs) const
1239  {
1240  return m_Begin == rhs.m_Begin && m_Size == rhs.m_Size;
1241  }
1242 
1243  /// Beginning indices of the slice in each dimension.
1244  std::vector<unsigned int> m_Begin;
1245 
1246  /// Size of the slice in each dimension.
1247  std::vector<unsigned int> m_Size;
1248 };
1249 
1250 /// A StackDescriptor for the StackLayer.
1252 {
1254  : m_Axis(0)
1255  , m_NumInputs(0)
1256  , m_InputShape()
1257  {}
1258 
1259  StackDescriptor(uint32_t axis, uint32_t numInputs, const TensorShape& inputShape)
1260  : m_Axis(axis)
1261  , m_NumInputs(numInputs)
1262  , m_InputShape(inputShape)
1263  {}
1264 
1265  bool operator ==(const StackDescriptor& rhs) const
1266  {
1267  return m_Axis == rhs.m_Axis &&
1268  m_NumInputs == rhs.m_NumInputs &&
1269  m_InputShape == rhs.m_InputShape;
1270  }
1271 
1272  /// 0-based axis along which to stack the input tensors.
1273  uint32_t m_Axis;
1274  /// Number of input tensors.
1275  uint32_t m_NumInputs;
1276  /// Required shape of all input tensors.
1278 };
1279 
1280 /// A StandInDescriptor for the StandIn layer
1282 {
1284 
1285  StandInDescriptor(uint32_t numInputs, uint32_t numOutputs)
1286  : m_NumInputs(numInputs)
1287  , m_NumOutputs(numOutputs)
1288  {}
1289 
1290  bool operator ==(const StandInDescriptor& rhs) const
1291  {
1292  return m_NumInputs == rhs.m_NumInputs &&
1293  m_NumOutputs == rhs.m_NumOutputs;
1294  }
1295 
1296  /// Number of input tensors
1297  uint32_t m_NumInputs = 0;
1298  /// Number of output tensors
1299  uint32_t m_NumOutputs = 0;
1300 };
1301 
1302 /// A StridedSliceDescriptor for the StridedSliceLayer.
1304 {
1305  StridedSliceDescriptor(const std::vector<int>& begin,
1306  const std::vector<int>& end,
1307  const std::vector<int>& stride)
1308  : m_Begin(begin)
1309  , m_End(end)
1310  , m_Stride(stride)
1311  , m_BeginMask(0)
1312  , m_EndMask(0)
1313  , m_ShrinkAxisMask(0)
1314  , m_EllipsisMask(0)
1315  , m_NewAxisMask(0)
1317  {}
1318 
1320  : StridedSliceDescriptor({}, {}, {})
1321  {}
1322 
1323  bool operator ==(const StridedSliceDescriptor& rhs) const
1324  {
1325  return m_Begin == rhs.m_Begin &&
1326  m_End == rhs.m_End &&
1327  m_Stride == rhs.m_Stride &&
1328  m_BeginMask == rhs.m_BeginMask &&
1329  m_EndMask == rhs.m_EndMask &&
1331  m_EllipsisMask == rhs.m_EllipsisMask &&
1332  m_NewAxisMask == rhs.m_NewAxisMask &&
1333  m_DataLayout == rhs.m_DataLayout;
1334  }
1335 
1336  int GetStartForAxis(const TensorShape& inputShape, unsigned int axis) const;
1337  int GetStopForAxis(const TensorShape& inputShape,
1338  unsigned int axis,
1339  int startForAxis) const;
1340 
1341  /// Begin values for the input that will be sliced.
1342  std::vector<int> m_Begin;
1343  /// End values for the input that will be sliced.
1344  std::vector<int> m_End;
1345  /// Stride values for the input that will be sliced.
1346  std::vector<int> m_Stride;
1347 
1348  /// @brief Begin mask value. If set, then the begin is disregarded and the fullest
1349  /// range is used for the dimension.
1350  int32_t m_BeginMask;
1351  /// @brief End mask value. If set, then the end is disregarded and the fullest range
1352  /// is used for the dimension.
1353  int32_t m_EndMask;
1354  /// Shrink axis mask value. If set, the nth specification shrinks the dimensionality by 1.
1356  /// Ellipsis mask value.
1358  /// @brief New axis mask value. If set, the begin, end and stride is disregarded and
1359  /// a new 1 dimension is inserted to this location of the output tensor.
1360  int32_t m_NewAxisMask;
1361 
1362  /// The data layout to be used (NCHW, NHWC).
1364 };
1365 
1366 /// A PreCompiledDescriptor for the PreCompiledLayer.
1368 {
1369  PreCompiledDescriptor(unsigned int numInputSlots = 1u, unsigned int numOutputSlots = 1u)
1370  : m_NumInputSlots(numInputSlots), m_NumOutputSlots(numOutputSlots)
1371  {}
1372 
1373  ~PreCompiledDescriptor() = default;
1374 
1375  unsigned int m_NumInputSlots;
1376  unsigned int m_NumOutputSlots;
1377 };
1378 
1379 /// A QLstmDescriptor for the QLstmLayer.
1381 {
1383  : m_CellClip(0.0)
1384  , m_ProjectionClip(0.0)
1385  , m_CifgEnabled(true)
1386  , m_PeepholeEnabled(false)
1387  , m_ProjectionEnabled(false)
1388  , m_LayerNormEnabled(false)
1394  , m_HiddenStateScale(0.0)
1395  {}
1396 
1397  bool operator ==(const QLstmDescriptor& rhs) const
1398  {
1399  return m_CellClip == rhs.m_CellClip &&
1401  m_CifgEnabled == rhs.m_CifgEnabled &&
1411  }
1412 
1413  /// Clipping threshold value for the cell state
1414  float m_CellClip;
1415  /// Clipping threshold value for the projection
1417  /// Enable/disable CIFG (coupled input & forget gate).
1419  /// Enable/disable peephole
1421  /// Enable/disable the projection layer
1423  /// Enable/disable layer normalization
1425  /// Input intermediate quantization scale
1427  /// Forget intermediate quantization scale
1429  /// Cell intermediate quantization scale
1431  /// Output intermediate quantization scale
1433  /// Hidden State zero point
1435  /// Hidden State quantization scale
1437 };
1438 
1439 /// A TransposeConvolution2dDescriptor for the TransposeConvolution2dLayer.
1441 {
1443  m_PadLeft(0),
1444  m_PadRight(0),
1445  m_PadTop(0),
1446  m_PadBottom(0),
1447  m_StrideX(0),
1448  m_StrideY(0),
1449  m_BiasEnabled(false),
1451  m_OutputShapeEnabled(false)
1452  {}
1453 
1455  {
1456  return m_PadLeft == rhs.m_PadLeft &&
1457  m_PadRight == rhs.m_PadRight &&
1458  m_PadTop == rhs.m_PadTop &&
1459  m_PadBottom == rhs.m_PadBottom &&
1460  m_StrideX == rhs.m_StrideX &&
1461  m_StrideY == rhs.m_StrideY &&
1462  m_BiasEnabled == rhs.m_BiasEnabled &&
1463  m_DataLayout == rhs.m_DataLayout &&
1466  }
1467 
1468  /// Padding left value in the width dimension.
1469  uint32_t m_PadLeft;
1470  /// Padding right value in the width dimension.
1471  uint32_t m_PadRight;
1472  /// Padding top value in the height dimension.
1473  uint32_t m_PadTop;
1474  /// Padding bottom value in the height dimension.
1475  uint32_t m_PadBottom;
1476  /// Stride value when proceeding through input for the width dimension.
1477  uint32_t m_StrideX;
1478  /// Stride value when proceeding through input for the height dimension.
1479  uint32_t m_StrideY;
1480  /// Enable/disable bias.
1482  /// The data layout to be used (NCHW, NHWC).
1484  /// Output shape if it has been specified.
1486  std::vector<unsigned int> m_OutputShape;
1487 };
1488 
1489 /// A TransposeDescriptor for the TransposeLayer.
1491 {
1493  : m_DimMappings{}
1494  {}
1495 
1497  : m_DimMappings(dimMappings)
1498  {}
1499 
1500  bool operator ==(const TransposeDescriptor &rhs) const
1501  {
1502  return m_DimMappings.IsEqual(rhs.m_DimMappings);
1503  }
1504 
1505  /// @brief Indicates how to translate tensor elements from a given source into the target destination, when
1506  /// source and target potentially have different memory layouts e.g.
1507  /// Input Shape {1, 1, 4, 4}
1508  /// Permutation Vector {0, 2, 3, 1}
1509  /// Output Shape {1, 4, 4, 1}
1510  /// dim "0" of input goes into index 0 ([ 1, X, X, X])
1511  /// dim "2" of input goes into index 1 ([ 1, 4, X, X ])
1512  /// dim "3" of input goes into index 2 ([ 1, 4, 4, X ])
1513  /// dim "1" of input goes into index 3 ([ 1, 4, 4, 1 ])
1515 };
1516 
1517 /// A LogicalBinaryDescriptor for the LogicalBinaryLayer
1519 {
1522  {}
1523 
1525  : m_Operation(operation)
1526  {}
1527 
1528  bool operator ==(const LogicalBinaryDescriptor &rhs) const
1529  {
1530  return m_Operation == rhs.m_Operation;
1531  }
1532 
1533  /// Specifies the logical operation to execute
1535 };
1536 
1537 /// A ReduceDescriptor for the REDUCE operators.
1539 {
1541  : m_KeepDims(false)
1542  , m_vAxis()
1544  {}
1545 
1546  bool operator ==(const ReduceDescriptor& rhs) const
1547  {
1548  return m_KeepDims == rhs.m_KeepDims &&
1549  m_vAxis == rhs.m_vAxis &&
1551  }
1552 
1553  /// if true then output shape has no change.
1555  /// The indices of the dimensions to reduce.
1556  std::vector<uint32_t> m_vAxis;
1557  /// Specifies the reduction operation to execute
1559 };
1560 
1561 /// A ChannelShuffleDescriptor for the ChannelShuffle operator
1563 {
1565  : m_NumGroups(0), m_Axis(0)
1566  {}
1567 
1568  ChannelShuffleDescriptor(const uint32_t& numGroups, const uint32_t& axis)
1569  : m_NumGroups(numGroups), m_Axis(axis)
1570  {}
1571 
1572  bool operator ==(const ChannelShuffleDescriptor& rhs) const
1573  {
1574  return m_NumGroups == rhs.m_NumGroups;
1575  }
1576 
1577  /// Number of groups for the channel shuffle operation
1578  uint32_t m_NumGroups;
1579  /// Axis to apply channel shuffle operation on
1580  uint32_t m_Axis;
1581 };
1582 
1583 /// A BatchMatMulDescriptor for the BatchMatMul operator
1585 {
1586  BatchMatMulDescriptor(bool transposeX = false,
1587  bool transposeY = false,
1588  bool adjointX = false,
1589  bool adjointY = false,
1590  DataLayout dataLayoutX = DataLayout::NCHW,
1591  DataLayout dataLayoutY = DataLayout::NCHW)
1592  : m_TransposeX(transposeX)
1593  , m_TransposeY(transposeY)
1594  , m_AdjointX(adjointX)
1595  , m_AdjointY(adjointY)
1596  , m_DataLayoutX(dataLayoutX)
1597  , m_DataLayoutY(dataLayoutY)
1598  {}
1599 
1600  bool operator ==(const BatchMatMulDescriptor &rhs) const
1601  {
1602  return m_TransposeX == rhs.m_TransposeX &&
1603  m_TransposeY == rhs.m_TransposeY &&
1604  m_AdjointX == rhs.m_AdjointX &&
1605  m_AdjointY == rhs.m_AdjointY &&
1606  m_DataLayoutX == rhs.m_DataLayoutX &&
1608  }
1609 
1610  /// Transpose the slices of each input tensor
1611  /// Transpose and Adjoint can not both be set to true for the same tensor at the same time
1614 
1615  /// Adjoint the slices of each input tensor
1616  /// Transpose and Adjoint can not both be set to true for the same tensor at the same time
1619 
1620  /// Data layout of each input tensor, such as NHWC/NDHWC (leave as default for arbitrary layout)
1623 
1624  /// Static helper to get the two axes (for each input) for multiplication
1625  static std::pair<unsigned int, unsigned int> GetAxesToMul(
1626  DataLayout dataLayout,
1627  const TensorShape& tensorShape);
1628 
1629  /// Static helper to get the axes (for each input) that will not be multiplied together
1630  static std::vector<unsigned int> GetAxesNotMul(
1631  DataLayout dataLayout,
1632  const TensorShape& tensorShape);
1633 
1634  /// Static helper to get the axes which will be transposed
1636  DataLayout dataLayout,
1637  const TensorShape& tensorShape);
1638 };
1639 
1641 {
1643  : m_Multiples()
1644  {}
1645 
1646  explicit TileDescriptor(std::vector<uint32_t> multiples)
1647  : m_Multiples(std::move(multiples))
1648  {}
1649 
1650  bool operator ==(const TileDescriptor& rhs) const
1651  {
1652  return m_Multiples == rhs.m_Multiples;
1653  }
1654 
1655  /// The vector to multiply the input shape by
1656  std::vector<uint32_t> m_Multiples;
1657 };
1658 
1660 {
1662  : m_BroadcastToShape()
1663  {}
1664 
1665  explicit BroadcastToDescriptor(const TensorShape& shape)
1666  : m_BroadcastToShape(shape)
1667  {}
1668 
1669  bool operator ==(const BroadcastToDescriptor& rhs) const
1670  {
1671  return m_BroadcastToShape == rhs.m_BroadcastToShape;
1672  }
1673 
1674  /// Target shape value.
1676 };
1677 
1678 } // namespace armnn
armnn::BatchNormalizationDescriptor
A BatchNormalizationDescriptor for the BatchNormalizationLayer.
Definition: Descriptors.hpp:828
armnn::Convolution2dDescriptor::m_PadTop
uint32_t m_PadTop
Padding top value in the height dimension.
Definition: Descriptors.hpp:570
armnn::ArgMinMaxFunction::Max
@ Max
armnn::InstanceNormalizationDescriptor::m_Beta
float m_Beta
Beta, the offset scalar value applied for the normalized tensor. Defaults to 1.0.
Definition: Descriptors.hpp:867
armnn::PermutationVector::IsEqual
bool IsEqual(const PermutationVector &other) const
Definition: Types.hpp:366
armnn::SliceDescriptor::m_Begin
std::vector< unsigned int > m_Begin
Beginning indices of the slice in each dimension.
Definition: Descriptors.hpp:1244
armnn::ArgMinMaxDescriptor::m_Output_Type
armnn::DataType m_Output_Type
Deprecated and will be removed in future release.
Definition: Descriptors.hpp:85
armnn::Convolution3dDescriptor::GetNumInputs
uint32_t GetNumInputs() const
Get the number of views/inputs.
Definition: Descriptors.cpp:464
armnn::ChannelShuffleDescriptor::m_Axis
uint32_t m_Axis
Axis to apply channel shuffle operation on.
Definition: Descriptors.hpp:1580
armnn::OriginsDescriptor::GetConcatAxis
unsigned int GetConcatAxis() const
Get the concatenation axis value.
Definition: Descriptors.cpp:162
armnn::FullyConnectedDescriptor::m_ConstantWeights
bool m_ConstantWeights
Enable/disable constant weights and biases.
Definition: Descriptors.hpp:530
armnn::Pooling2dDescriptor::m_PaddingMethod
PaddingMethod m_PaddingMethod
The padding method to be used. (Exclude, IgnoreValue).
Definition: Descriptors.hpp:425
armnn::ViewsDescriptor
A ViewsDescriptor for the SplitterLayer.
Definition: Descriptors.hpp:244
armnn::DetectionPostProcessDescriptor::m_NmsScoreThreshold
float m_NmsScoreThreshold
NMS score threshold.
Definition: Descriptors.hpp:751
armnn::QLstmDescriptor::m_ForgetIntermediateScale
float m_ForgetIntermediateScale
Forget intermediate quantization scale.
Definition: Descriptors.hpp:1428
armnn::ActivationDescriptor
An ActivationDescriptor for the ActivationLayer.
Definition: Descriptors.hpp:36
armnn::TransposeConvolution2dDescriptor::m_PadLeft
uint32_t m_PadLeft
Padding left value in the width dimension.
Definition: Descriptors.hpp:1469
armnn::BatchMatMulDescriptor::m_TransposeX
bool m_TransposeX
Transpose the slices of each input tensor Transpose and Adjoint can not both be set to true for the s...
Definition: Descriptors.hpp:1612
armnn::OriginsDescriptor::GetNumViews
uint32_t GetNumViews() const
Get the number of views.
Definition: Descriptors.cpp:187
armnn::OriginsDescriptor::~OriginsDescriptor
~OriginsDescriptor()
Definition: Descriptors.cpp:120
armnn::FusedDescriptor::operator==
bool operator==(const FusedDescriptor &rhs) const
Definition: Descriptors.hpp:952
armnn::PadDescriptor::PadDescriptor
PadDescriptor(const std::vector< std::pair< unsigned int, unsigned int >> &padList, const float &padValue=0, const PaddingMode &paddingMode=PaddingMode::Constant)
Definition: Descriptors.hpp:1201
armnn::FullyConnectedDescriptor
A FullyConnectedDescriptor for the FullyConnectedLayer.
Definition: Descriptors.hpp:507
armnn::BinaryOperation::Add
@ Add
armnn::DetectionPostProcessDescriptor::operator==
bool operator==(const DetectionPostProcessDescriptor &rhs) const
Definition: Descriptors.hpp:729
armnn::NullDescriptor
Null Descriptor used as a return value from the IConnectableLayer GetParameters method by layers whic...
Definition: Descriptors.hpp:30
armnn::ChannelShuffleDescriptor::operator==
bool operator==(const ChannelShuffleDescriptor &rhs) const
Definition: Descriptors.hpp:1572
armnn::PadDescriptor::operator==
bool operator==(const PadDescriptor &rhs) const
Definition: Descriptors.hpp:1209
armnn::DetectionPostProcessDescriptor::m_ScaleX
float m_ScaleX
Center size encoding scale x.
Definition: Descriptors.hpp:759
armnn::QLstmDescriptor
A QLstmDescriptor for the QLstmLayer.
Definition: Descriptors.hpp:1380
armnn::TransposeConvolution2dDescriptor::m_StrideX
uint32_t m_StrideX
Stride value when proceeding through input for the width dimension.
Definition: Descriptors.hpp:1477
armnn::DataLayout::NCDHW
@ NCDHW
armnn::FusedDescriptor::m_FusedKernelType
FusedKernelType m_FusedKernelType
Definition: Descriptors.hpp:961
armnn::FakeQuantizationDescriptor::operator==
bool operator==(const FakeQuantizationDescriptor &rhs) const
Definition: Descriptors.hpp:913
armnn::StridedSliceDescriptor::StridedSliceDescriptor
StridedSliceDescriptor(const std::vector< int > &begin, const std::vector< int > &end, const std::vector< int > &stride)
Definition: Descriptors.hpp:1305
armnn::QLstmDescriptor::m_ProjectionEnabled
bool m_ProjectionEnabled
Enable/disable the projection layer.
Definition: Descriptors.hpp:1422
armnn::Pooling3dDescriptor::m_OutputShapeRounding
OutputShapeRounding m_OutputShapeRounding
The rounding method for the output shape. (Floor, Ceiling).
Definition: Descriptors.hpp:499
armnn::ResizeDescriptor::m_HalfPixelCenters
bool m_HalfPixelCenters
Half Pixel Centers.
Definition: Descriptors.hpp:1018
armnn::LstmDescriptor::m_TimeMajor
bool m_TimeMajor
Enable/disable time major.
Definition: Descriptors.hpp:1154
armnn::BatchNormalizationDescriptor::m_DataLayout
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
Definition: Descriptors.hpp:843
armnn::ResizeMethod
ResizeMethod
Definition: Types.hpp:166
armnn::DataLayout
DataLayout
Definition: Types.hpp:62
armnn::StandInDescriptor::StandInDescriptor
StandInDescriptor(uint32_t numInputs, uint32_t numOutputs)
Definition: Descriptors.hpp:1285
armnn::Pooling3dDescriptor::m_PadTop
uint32_t m_PadTop
Padding top value in the height dimension.
Definition: Descriptors.hpp:479
armnn::SpaceToBatchNdDescriptor::m_DataLayout
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
Definition: Descriptors.hpp:1071
armnn::FullyConnectedDescriptor::m_TransposeWeightMatrix
bool m_TransposeWeightMatrix
Enable/disable transpose weight matrix.
Definition: Descriptors.hpp:528
armnn::ResizeDescriptor::m_TargetHeight
uint32_t m_TargetHeight
Target height value.
Definition: Descriptors.hpp:1009
armnn::DepthwiseConvolution2dDescriptor::m_BiasEnabled
bool m_BiasEnabled
Enable/disable bias.
Definition: Descriptors.hpp:708
armnn::OriginsDescriptor::ReorderOrigins
void ReorderOrigins(unsigned int *newOrdering, unsigned int numNewOrdering)
Reorders the viewOrigins in accordance with the indices presented in newOrdering array.
Definition: Descriptors.cpp:204
armnn::ArgMinMaxDescriptor::ArgMinMaxDescriptor
ArgMinMaxDescriptor()
Definition: Descriptors.hpp:69
armnn::Pooling2dDescriptor::m_PoolHeight
uint32_t m_PoolHeight
Pooling height value.
Definition: Descriptors.hpp:417
armnn::StridedSliceDescriptor::m_Begin
std::vector< int > m_Begin
Begin values for the input that will be sliced.
Definition: Descriptors.hpp:1342
armnn::DetectionPostProcessDescriptor::m_ScaleY
float m_ScaleY
Center size encoding scale y.
Definition: Descriptors.hpp:761
armnn::Pooling3dDescriptor
A Pooling3dDescriptor for the Pooling3dLayer.
Definition: Descriptors.hpp:431
armnn::BatchMatMulDescriptor::m_AdjointX
bool m_AdjointX
Adjoint the slices of each input tensor Transpose and Adjoint can not both be set to true for the sam...
Definition: Descriptors.hpp:1617
armnn::DetectionPostProcessDescriptor::m_MaxDetections
uint32_t m_MaxDetections
Maximum numbers of detections.
Definition: Descriptors.hpp:745
armnn::DataLayout::NHWC
@ NHWC
armnn::BatchMatMulDescriptor::GetAxesToMul
static std::pair< unsigned int, unsigned int > GetAxesToMul(DataLayout dataLayout, const TensorShape &tensorShape)
Static helper to get the two axes (for each input) for multiplication.
Definition: Descriptors.cpp:484
armnn::LogicalBinaryDescriptor::LogicalBinaryDescriptor
LogicalBinaryDescriptor(LogicalBinaryOperation operation)
Definition: Descriptors.hpp:1524
armnn::QLstmDescriptor::QLstmDescriptor
QLstmDescriptor()
Definition: Descriptors.hpp:1382
armnn::ResizeDescriptor::ResizeDescriptor
ResizeDescriptor()
Definition: Descriptors.hpp:987
armnn::Convolution3dDescriptor::m_PadFront
uint32_t m_PadFront
Padding front value in the depth dimension.
Definition: Descriptors.hpp:637
armnn::ResizeDescriptor
A ResizeDescriptor for the ResizeLayer.
Definition: Descriptors.hpp:985
armnn::ArgMinMaxDescriptor
An ArgMinMaxDescriptor for ArgMinMaxLayer.
Definition: Descriptors.hpp:67
armnn::ActivationDescriptor::m_A
float m_A
Alpha upper bound value used by the activation functions. (BoundedReLu, Linear, TanH,...
Definition: Descriptors.hpp:61
armnn::InstanceNormalizationDescriptor
An InstanceNormalizationDescriptor for InstanceNormalizationLayer.
Definition: Descriptors.hpp:847
armnn::StridedSliceDescriptor::m_EllipsisMask
int32_t m_EllipsisMask
Ellipsis mask value.
Definition: Descriptors.hpp:1357
armnn::ViewsDescriptor::HasAxis
bool HasAxis() const
Returns true if an axis has been set.
Definition: Descriptors.cpp:387
armnn::SoftmaxDescriptor::m_Beta
float m_Beta
Exponentiation value.
Definition: Descriptors.hpp:190
armnn::GatherDescriptor::operator==
bool operator==(const GatherDescriptor &rhs) const
Definition: Descriptors.hpp:975
armnn::GatherDescriptor
A GatherDescriptor for the GatherLayer.
Definition: Descriptors.hpp:965
armnn::DepthwiseConvolution2dDescriptor::m_DataLayout
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
Definition: Descriptors.hpp:710
armnn::Pooling3dDescriptor::Pooling3dDescriptor
Pooling3dDescriptor()
Definition: Descriptors.hpp:433
armnn::BatchNormalizationDescriptor::operator==
bool operator==(const BatchNormalizationDescriptor &rhs) const
Definition: Descriptors.hpp:835
armnn::FillDescriptor::FillDescriptor
FillDescriptor()
Definition: Descriptors.hpp:927
armnn::StackDescriptor::StackDescriptor
StackDescriptor()
Definition: Descriptors.hpp:1253
armnn::BatchMatMulDescriptor::m_DataLayoutX
DataLayout m_DataLayoutX
Data layout of each input tensor, such as NHWC/NDHWC (leave as default for arbitrary layout)
Definition: Descriptors.hpp:1621
armnn::L2NormalizationDescriptor::m_DataLayout
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
Definition: Descriptors.hpp:824
armnn::L2NormalizationDescriptor
A L2NormalizationDescriptor for the L2NormalizationLayer.
Definition: Descriptors.hpp:809
armnn::OutputShapeRounding
OutputShapeRounding
Definition: Types.hpp:221
armnn::TransposeDescriptor::TransposeDescriptor
TransposeDescriptor()
Definition: Descriptors.hpp:1492
armnn::NormalizationAlgorithmMethod::LocalBrightness
@ LocalBrightness
Krichevsky 2012: Local Brightness Normalization.
armnn::NormalizationDescriptor::m_Beta
float m_Beta
Beta value for the normalization equation.
Definition: Descriptors.hpp:801
armnn::NormalizationAlgorithmMethod
NormalizationAlgorithmMethod
Definition: Types.hpp:213
armnn::OriginsDescriptor::GetNumDimensions
uint32_t GetNumDimensions() const
Get the number of dimensions.
Definition: Descriptors.cpp:192
armnn::FakeQuantizationDescriptor::m_Max
float m_Max
Maximum value.
Definition: Descriptors.hpp:921
armnn::NormalizationDescriptor
A NormalizationDescriptor for the NormalizationLayer.
Definition: Descriptors.hpp:769
armnn::OutputShapeRounding::Floor
@ Floor
armnn::ActivationDescriptor::ActivationDescriptor
ActivationDescriptor()
Definition: Descriptors.hpp:38
armnn::Pooling2dDescriptor::m_StrideY
uint32_t m_StrideY
Stride value when proceeding through input for the height dimension.
Definition: Descriptors.hpp:421
armnn::PadDescriptor::PadDescriptor
PadDescriptor()
Definition: Descriptors.hpp:1198
armnn::Pooling2dDescriptor::operator==
bool operator==(const Pooling2dDescriptor &rhs) const
Definition: Descriptors.hpp:388
armnn::BatchToSpaceNdDescriptor::m_BlockShape
std::vector< unsigned int > m_BlockShape
Block shape values.
Definition: Descriptors.hpp:898
Deprecated.hpp
armnn::ChannelShuffleDescriptor
A ChannelShuffleDescriptor for the ChannelShuffle operator.
Definition: Descriptors.hpp:1562
armnn::BatchMatMulDescriptor::GetPermuteVec
static PermutationVector GetPermuteVec(DataLayout dataLayout, const TensorShape &tensorShape)
Static helper to get the axes which will be transposed.
Definition: Descriptors.cpp:522
armnn::ResizeDescriptor::m_DataLayout
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
Definition: Descriptors.hpp:1014
armnn::DepthwiseConvolution2dDescriptor::m_PadLeft
uint32_t m_PadLeft
Padding left value in the width dimension.
Definition: Descriptors.hpp:692
armnn::Convolution2dDescriptor::m_StrideY
uint32_t m_StrideY
Stride value when proceeding through input for the height dimension.
Definition: Descriptors.hpp:576
armnn::Pooling2dDescriptor::m_PadTop
uint32_t m_PadTop
Padding top value in the height dimension.
Definition: Descriptors.hpp:411
armnn::Convolution3dDescriptor::m_PadTop
uint32_t m_PadTop
Padding top value in the height dimension.
Definition: Descriptors.hpp:633
armnn::ArgMinMaxDescriptor::m_Function
ArgMinMaxFunction m_Function
Specify if the function is to find Min or Max.
Definition: Descriptors.hpp:81
armnn::SpaceToBatchNdDescriptor::m_BlockShape
std::vector< unsigned int > m_BlockShape
Block shape value.
Definition: Descriptors.hpp:1066
armnn::L2NormalizationDescriptor::operator==
bool operator==(const L2NormalizationDescriptor &rhs) const
Definition: Descriptors.hpp:816
armnn::StridedSliceDescriptor::m_BeginMask
int32_t m_BeginMask
Begin mask value.
Definition: Descriptors.hpp:1350
armnn::BatchMatMulDescriptor::m_AdjointY
bool m_AdjointY
Definition: Descriptors.hpp:1618
armnn::Convolution3dDescriptor::m_DilationX
uint32_t m_DilationX
Dilation along x axis.
Definition: Descriptors.hpp:647
armnn::PaddingMode
PaddingMode
The padding mode controls whether the padding should be filled with constant values (Constant),...
Definition: Types.hpp:200
armnn::Convolution3dDescriptor::m_PadBottom
uint32_t m_PadBottom
Padding bottom value in the height dimension.
Definition: Descriptors.hpp:635
armnn::GatherDescriptor::GatherDescriptor
GatherDescriptor()
Definition: Descriptors.hpp:967
armnn::InstanceNormalizationDescriptor::operator==
bool operator==(const InstanceNormalizationDescriptor &rhs) const
Definition: Descriptors.hpp:856
armnn::QLstmDescriptor::m_InputIntermediateScale
float m_InputIntermediateScale
Input intermediate quantization scale.
Definition: Descriptors.hpp:1426
armnn::ArgMinMaxFunction
ArgMinMaxFunction
Definition: Types.hpp:103
armnn::DetectionPostProcessDescriptor::m_ScaleW
float m_ScaleW
Center size encoding scale weight.
Definition: Descriptors.hpp:763
armnn::FusedDescriptor::FusedDescriptor
FusedDescriptor(unsigned int numInputSlots=4u, unsigned int numOutputSlots=2u, FusedKernelType fusedType=FusedKernelType::AddMulAdd)
Definition: Descriptors.hpp:946
armnn::LstmDescriptor::m_InputIntermediateScale
float m_InputIntermediateScale
Input intermediate quantization scale.
Definition: Descriptors.hpp:1156
armnn::StackDescriptor
A StackDescriptor for the StackLayer.
Definition: Descriptors.hpp:1251
armnn::BroadcastToDescriptor::BroadcastToDescriptor
BroadcastToDescriptor(const TensorShape &shape)
Definition: Descriptors.hpp:1665
armnn::SpaceToDepthDescriptor::operator==
bool operator==(const SpaceToDepthDescriptor &rhs) const
Definition: Descriptors.hpp:1086
armnn::LstmDescriptor::operator==
bool operator==(const LstmDescriptor &rhs) const
Definition: Descriptors.hpp:1121
armnn::Pooling3dDescriptor::m_StrideZ
uint32_t m_StrideZ
Stride value when proceeding through input for the depth dimension.
Definition: Descriptors.hpp:497
armnn::SpaceToBatchNdDescriptor::SpaceToBatchNdDescriptor
SpaceToBatchNdDescriptor()
Definition: Descriptors.hpp:1045
armnn::NormalizationDescriptor::m_NormSize
uint32_t m_NormSize
Depth radius value.
Definition: Descriptors.hpp:797
armnn::BroadcastToDescriptor::m_BroadcastToShape
TensorShape m_BroadcastToShape
Target shape value.
Definition: Descriptors.hpp:1675
armnn::TileDescriptor::TileDescriptor
TileDescriptor(std::vector< uint32_t > multiples)
Definition: Descriptors.hpp:1646
armnn::Pooling2dDescriptor::m_PoolWidth
uint32_t m_PoolWidth
Pooling width value.
Definition: Descriptors.hpp:415
armnn::StandInDescriptor::m_NumInputs
uint32_t m_NumInputs
Number of input tensors.
Definition: Descriptors.hpp:1297
armnn::LogicalBinaryOperation
LogicalBinaryOperation
Definition: Types.hpp:119
armnn::TransposeConvolution2dDescriptor::TransposeConvolution2dDescriptor
TransposeConvolution2dDescriptor()
Definition: Descriptors.hpp:1442
armnn::Pooling3dDescriptor::m_DataLayout
DataLayout m_DataLayout
The data layout to be used (NCDHW, NDHWC).
Definition: Descriptors.hpp:503
armnn::ResizeDescriptor::operator==
bool operator==(const ResizeDescriptor &rhs) const
Definition: Descriptors.hpp:996
armnn::Convolution2dDescriptor::m_PadLeft
uint32_t m_PadLeft
Padding left value in the width dimension.
Definition: Descriptors.hpp:566
armnn::BatchToSpaceNdDescriptor::m_Crops
std::vector< std::pair< unsigned int, unsigned int > > m_Crops
The values to crop from the input dimension.
Definition: Descriptors.hpp:900
armnn::ViewsDescriptor::SetViewSize
Status SetViewSize(uint32_t view, uint32_t coord, uint32_t value)
Set the size of the views.
Definition: Descriptors.cpp:321
armnn::StandInDescriptor::StandInDescriptor
StandInDescriptor()
Definition: Descriptors.hpp:1283
armnn::DepthwiseConvolution2dDescriptor::m_StrideY
uint32_t m_StrideY
Stride value when proceeding through input for the height dimension.
Definition: Descriptors.hpp:702
armnn::Convolution2dDescriptor::m_DilationY
uint32_t m_DilationY
Dilation along y axis.
Definition: Descriptors.hpp:580
armnn::PreCompiledDescriptor::PreCompiledDescriptor
PreCompiledDescriptor(unsigned int numInputSlots=1u, unsigned int numOutputSlots=1u)
Definition: Descriptors.hpp:1369
armnn::StackDescriptor::StackDescriptor
StackDescriptor(uint32_t axis, uint32_t numInputs, const TensorShape &inputShape)
Definition: Descriptors.hpp:1259
armnn::Pooling3dDescriptor::m_PadBottom
uint32_t m_PadBottom
Padding bottom value in the height dimension.
Definition: Descriptors.hpp:481
armnn::DetectionPostProcessDescriptor::m_MaxClassesPerDetection
uint32_t m_MaxClassesPerDetection
Maximum numbers of classes per detection, used in Fast NMS.
Definition: Descriptors.hpp:747
armnn::Convolution3dDescriptor::Convolution3dDescriptor
Convolution3dDescriptor()
Definition: Descriptors.hpp:590
armnn::BatchNormalizationDescriptor::BatchNormalizationDescriptor
BatchNormalizationDescriptor()
Definition: Descriptors.hpp:830
armnn::QLstmDescriptor::m_CellIntermediateScale
float m_CellIntermediateScale
Cell intermediate quantization scale.
Definition: Descriptors.hpp:1430
armnn::NormalizationDescriptor::m_NormMethodType
NormalizationAlgorithmMethod m_NormMethodType
Normalization method algorithm to use (LocalBrightness, LocalContrast).
Definition: Descriptors.hpp:795
armnn::NullDescriptor::IsNull
bool IsNull() const override
Definition: Descriptors.hpp:32
armnn::LogicalBinaryDescriptor::operator==
bool operator==(const LogicalBinaryDescriptor &rhs) const
Definition: Descriptors.hpp:1528
armnn::FullyConnectedDescriptor::FullyConnectedDescriptor
FullyConnectedDescriptor()
Definition: Descriptors.hpp:509
armnn::QLstmDescriptor::operator==
bool operator==(const QLstmDescriptor &rhs) const
Definition: Descriptors.hpp:1397
armnn::TransposeConvolution2dDescriptor::m_PadBottom
uint32_t m_PadBottom
Padding bottom value in the height dimension.
Definition: Descriptors.hpp:1475
armnn::Pooling3dDescriptor::m_StrideY
uint32_t m_StrideY
Stride value when proceeding through input for the height dimension.
Definition: Descriptors.hpp:495
armnn::FullyConnectedDescriptor::operator==
bool operator==(const FullyConnectedDescriptor &rhs) const
Definition: Descriptors.hpp:515
armnn::NormalizationAlgorithmChannel::Across
@ Across
armnn::ReduceDescriptor::m_ReduceOperation
ReduceOperation m_ReduceOperation
Specifies the reduction operation to execute.
Definition: Descriptors.hpp:1558
armnn::PreCompiledDescriptor::~PreCompiledDescriptor
~PreCompiledDescriptor()=default
armnn::StridedSliceDescriptor::GetStopForAxis
int GetStopForAxis(const TensorShape &inputShape, unsigned int axis, int startForAxis) const
Definition: Descriptors.cpp:419
armnn::PreCompiledDescriptor::m_NumInputSlots
unsigned int m_NumInputSlots
Definition: Descriptors.hpp:1375
armnn::FusedKernelType::AddMulAdd
@ AddMulAdd
armnn::MeanDescriptor::m_KeepDims
bool m_KeepDims
Enable/disable keep dimensions. If true, then the reduced dimensions that are of length 1 are kept.
Definition: Descriptors.hpp:1192
armnn::PermuteDescriptor::PermuteDescriptor
PermuteDescriptor(const PermutationVector &dimMappings)
Definition: Descriptors.hpp:155
armnn::GatherDescriptor::GatherDescriptor
GatherDescriptor(int32_t axis)
Definition: Descriptors.hpp:971
armnn::DataLayout::NDHWC
@ NDHWC
armnn::FillDescriptor::m_Value
float m_Value
Definition: Descriptors.hpp:940
armnn::ElementwiseBinaryDescriptor::operator==
bool operator==(const ElementwiseBinaryDescriptor &rhs) const
Definition: Descriptors.hpp:119
armnn::ElementwiseBinaryDescriptor
A ElementwiseBinaryDescriptor for the ElementwiseBinaryLayer.
Definition: Descriptors.hpp:109
armnn::ViewsDescriptor::GetViewSizes
const uint32_t * GetViewSizes(uint32_t idx) const
Get the view sizes at the int value idx.
Definition: Descriptors.cpp:346
armnn::TransposeDescriptor::operator==
bool operator==(const TransposeDescriptor &rhs) const
Definition: Descriptors.hpp:1500
armnn::ViewsDescriptor::SetViewOriginCoord
Status SetViewOriginCoord(uint32_t view, uint32_t coord, uint32_t value)
@Brief Set the view origin coordinates.
Definition: Descriptors.cpp:316
armnn::Pooling3dDescriptor::m_PoolType
PoolingAlgorithm m_PoolType
The pooling algorithm to use (Max. Average, L2).
Definition: Descriptors.hpp:473
armnn::ResizeDescriptor::m_Method
ResizeMethod m_Method
The Interpolation method to use (Bilinear, NearestNeighbor).
Definition: Descriptors.hpp:1012
armnn::SpaceToBatchNdDescriptor::m_PadList
std::vector< std::pair< unsigned int, unsigned int > > m_PadList
Specifies the padding values for the input dimension: heightPad{top, bottom} widthPad{left,...
Definition: Descriptors.hpp:1069
armnn::MeanDescriptor::MeanDescriptor
MeanDescriptor(const std::vector< unsigned int > &axis, bool keepDims)
Definition: Descriptors.hpp:1179
armnn::LstmDescriptor::m_PeepholeEnabled
bool m_PeepholeEnabled
Enable/disable peephole.
Definition: Descriptors.hpp:1148
armnn::TensorShape
Definition: Tensor.hpp:20
armnn::Convolution3dDescriptor::m_PadRight
uint32_t m_PadRight
Padding right value in the width dimension.
Definition: Descriptors.hpp:631
armnn::NormalizationDescriptor::m_NormChannelType
NormalizationAlgorithmChannel m_NormChannelType
Normalization channel algorithm to use (Across, Within).
Definition: Descriptors.hpp:793
armnn::NormalizationDescriptor::NormalizationDescriptor
NormalizationDescriptor()
Definition: Descriptors.hpp:771
armnn::Convolution2dDescriptor::Convolution2dDescriptor
Convolution2dDescriptor()
Definition: Descriptors.hpp:536
armnn::FusedDescriptor
A FusedDescriptor for the FusedLayer.
Definition: Descriptors.hpp:944
armnn::StackDescriptor::m_NumInputs
uint32_t m_NumInputs
Number of input tensors.
Definition: Descriptors.hpp:1275
armnn::LstmDescriptor::m_ClippingThresProj
float m_ClippingThresProj
Clipping threshold value for the projection.
Definition: Descriptors.hpp:1144
armnn::DepthwiseConvolution2dDescriptor::operator==
bool operator==(const DepthwiseConvolution2dDescriptor &rhs) const
Definition: Descriptors.hpp:674
armnn::Pooling3dDescriptor::m_PoolWidth
uint32_t m_PoolWidth
Pooling width value.
Definition: Descriptors.hpp:487
armnn::StridedSliceDescriptor::m_DataLayout
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
Definition: Descriptors.hpp:1363
armnn::StackDescriptor::operator==
bool operator==(const StackDescriptor &rhs) const
Definition: Descriptors.hpp:1265
armnn::Pooling2dDescriptor::m_DataLayout
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
Definition: Descriptors.hpp:427
armnn::Convolution2dDescriptor::GetNumInputs
uint32_t GetNumInputs() const
Definition: Descriptors.cpp:469
armnn::DepthwiseConvolution2dDescriptor::m_DilationY
uint32_t m_DilationY
Dilation factor value for height dimension.
Definition: Descriptors.hpp:706
armnn::Pooling2dDescriptor::m_PadBottom
uint32_t m_PadBottom
Padding bottom value in the height dimension.
Definition: Descriptors.hpp:413
armnn::ViewsDescriptor::GetAxis
int32_t GetAxis() const
Get the axis value.
Definition: Descriptors.cpp:381
armnn::Pooling3dDescriptor::m_PaddingMethod
PaddingMethod m_PaddingMethod
The padding method to be used. (Exclude, IgnoreValue).
Definition: Descriptors.hpp:501
armnn::Pooling2dDescriptor::m_PadRight
uint32_t m_PadRight
Padding right value in the width dimension.
Definition: Descriptors.hpp:409
armnn::BatchToSpaceNdDescriptor::BatchToSpaceNdDescriptor
BatchToSpaceNdDescriptor()
Definition: Descriptors.hpp:877
armnn::FullyConnectedDescriptor::m_BiasEnabled
bool m_BiasEnabled
Enable/disable bias.
Definition: Descriptors.hpp:526
armnn::OriginsDescriptor::operator=
OriginsDescriptor & operator=(OriginsDescriptor rhs)
Definition: Descriptors.cpp:129
armnn::PermuteDescriptor::operator==
bool operator==(const PermuteDescriptor &rhs) const
Definition: Descriptors.hpp:159
armnn::LogicalBinaryDescriptor::m_Operation
LogicalBinaryOperation m_Operation
Specifies the logical operation to execute.
Definition: Descriptors.hpp:1534
armnn::PadDescriptor
A PadDescriptor for the PadLayer.
Definition: Descriptors.hpp:1196
armnn::TransposeDescriptor
A TransposeDescriptor for the TransposeLayer.
Definition: Descriptors.hpp:1490
armnn::Convolution3dDescriptor::m_DilationZ
uint32_t m_DilationZ
Dilation along z axis.
Definition: Descriptors.hpp:651
armnn::BatchMatMulDescriptor::m_TransposeY
bool m_TransposeY
Definition: Descriptors.hpp:1613
armnn::ViewsDescriptor::GetOrigins
const OriginsDescriptor & GetOrigins() const
Get the View Origins.
Definition: Descriptors.cpp:351
armnn::DetectionPostProcessDescriptor::m_NumClasses
uint32_t m_NumClasses
Number of classes.
Definition: Descriptors.hpp:755
armnn::PaddingMethod::Exclude
@ Exclude
The padding fields don't count and are ignored.
armnn::StackDescriptor::m_Axis
uint32_t m_Axis
0-based axis along which to stack the input tensors.
Definition: Descriptors.hpp:1273
armnn::SliceDescriptor
A SliceDescriptor for the SliceLayer.
Definition: Descriptors.hpp:1228
armnn::DataType
DataType
Definition: Types.hpp:48
armnn::FillDescriptor::FillDescriptor
FillDescriptor(const float &value)
Definition: Descriptors.hpp:931
armnn::InstanceNormalizationDescriptor::m_Gamma
float m_Gamma
Gamma, the scale scalar value applied for the normalized tensor. Defaults to 1.0.
Definition: Descriptors.hpp:865
armnn::DetectionPostProcessDescriptor::m_NmsIouThreshold
float m_NmsIouThreshold
Intersection over union threshold.
Definition: Descriptors.hpp:753
armnn::ComparisonDescriptor::ComparisonDescriptor
ComparisonDescriptor(ComparisonOperation operation)
Definition: Descriptors.hpp:95
armnn::SpaceToBatchNdDescriptor::SpaceToBatchNdDescriptor
SpaceToBatchNdDescriptor(const std::vector< unsigned int > &blockShape, const std::vector< std::pair< unsigned int, unsigned int >> &padList)
Definition: Descriptors.hpp:1051
armnn::SoftmaxDescriptor::operator==
bool operator==(const SoftmaxDescriptor &rhs) const
Definition: Descriptors.hpp:184
armnn::BatchToSpaceNdDescriptor::operator==
bool operator==(const BatchToSpaceNdDescriptor &rhs) const
Definition: Descriptors.hpp:890
armnn::Convolution2dDescriptor::m_BiasEnabled
bool m_BiasEnabled
Enable/disable bias.
Definition: Descriptors.hpp:582
armnn::BatchMatMulDescriptor::m_DataLayoutY
DataLayout m_DataLayoutY
Definition: Descriptors.hpp:1622
armnn::ChannelShuffleDescriptor::ChannelShuffleDescriptor
ChannelShuffleDescriptor()
Definition: Descriptors.hpp:1564
armnn::TransposeDescriptor::TransposeDescriptor
TransposeDescriptor(const PermutationVector &dimMappings)
Definition: Descriptors.hpp:1496
armnn::ReshapeDescriptor
A ReshapeDescriptor for the ReshapeLayer.
Definition: Descriptors.hpp:1023
armnn::LstmDescriptor::m_HiddenStateScale
float m_HiddenStateScale
Hidden State quantization scale.
Definition: Descriptors.hpp:1166
armnn::InvalidArgumentException
Definition: Exceptions.hpp:80
armnn::LogicalBinaryDescriptor::LogicalBinaryDescriptor
LogicalBinaryDescriptor()
Definition: Descriptors.hpp:1520
armnn::SpaceToBatchNdDescriptor::operator==
bool operator==(const SpaceToBatchNdDescriptor &rhs) const
Definition: Descriptors.hpp:1058
armnn::PadDescriptor::m_PadValue
float m_PadValue
Optional value to use for padding, defaults to 0.
Definition: Descriptors.hpp:1221
armnn::DepthwiseConvolution2dDescriptor::m_PadRight
uint32_t m_PadRight
Padding right value in the width dimension.
Definition: Descriptors.hpp:694
armnn::MeanDescriptor::operator==
bool operator==(const MeanDescriptor &rhs) const
Definition: Descriptors.hpp:1184
armnn::Convolution3dDescriptor::m_PadLeft
uint32_t m_PadLeft
Padding left value in the width dimension.
Definition: Descriptors.hpp:629
armnn::StridedSliceDescriptor::StridedSliceDescriptor
StridedSliceDescriptor()
Definition: Descriptors.hpp:1319
armnn::ActivationDescriptor::m_Function
ActivationFunction m_Function
The activation function to use (Sigmoid, TanH, Linear, ReLu, BoundedReLu, SoftReLu,...
Definition: Descriptors.hpp:59
armnn::NormalizationDescriptor::m_DataLayout
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
Definition: Descriptors.hpp:805
armnn::LstmDescriptor::m_HiddenStateZeroPoint
int32_t m_HiddenStateZeroPoint
Hidden State zero point.
Definition: Descriptors.hpp:1164
armnn::PermuteDescriptor
A PermuteDescriptor for the PermuteLayer.
Definition: Descriptors.hpp:149
armnn::ComparisonDescriptor::ComparisonDescriptor
ComparisonDescriptor()
Definition: Descriptors.hpp:91
armnn::BatchMatMulDescriptor
A BatchMatMulDescriptor for the BatchMatMul operator.
Definition: Descriptors.hpp:1584
armnn::Convolution3dDescriptor::m_StrideY
uint32_t m_StrideY
Stride value when proceeding through input for the height dimension.
Definition: Descriptors.hpp:643
DescriptorsFwd.hpp
armnn::ReduceOperation::Sum
@ Sum
armnn::SliceDescriptor::SliceDescriptor
SliceDescriptor(const std::vector< unsigned int > &begin, const std::vector< unsigned int > &size)
Definition: Descriptors.hpp:1230
armnn::InstanceNormalizationDescriptor::InstanceNormalizationDescriptor
InstanceNormalizationDescriptor()
Definition: Descriptors.hpp:849
armnn::Convolution2dDescriptor::m_DataLayout
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
Definition: Descriptors.hpp:584
armnn::FusedDescriptor::m_NumInputSlots
unsigned int m_NumInputSlots
Definition: Descriptors.hpp:959
armnn::QLstmDescriptor::m_ProjectionClip
float m_ProjectionClip
Clipping threshold value for the projection.
Definition: Descriptors.hpp:1416
armnn::GatherDescriptor::m_Axis
int32_t m_Axis
The axis in params to gather indices from.
Definition: Descriptors.hpp:981
armnn::Convolution3dDescriptor::m_StrideX
uint32_t m_StrideX
Stride value when proceeding through input for the width dimension.
Definition: Descriptors.hpp:641
armnn::SpaceToBatchNdDescriptor
A SpaceToBatchNdDescriptor for the SpaceToBatchNdLayer.
Definition: Descriptors.hpp:1043
armnn::SliceDescriptor::SliceDescriptor
SliceDescriptor()
Definition: Descriptors.hpp:1235
armnn::Convolution2dDescriptor::m_PadBottom
uint32_t m_PadBottom
Padding bottom value in the height dimension.
Definition: Descriptors.hpp:572
armnn::PermutationVector
Definition: Types.hpp:314
armnn::OriginsDescriptor::swap
friend void swap(OriginsDescriptor &first, OriginsDescriptor &second)
Swap the ViewsDescriptor values first and second.
Definition: Descriptors.cpp:356
armnn::BroadcastToDescriptor::BroadcastToDescriptor
BroadcastToDescriptor()
Definition: Descriptors.hpp:1661
armnn::Convolution3dDescriptor
A Convolution3dDescriptor for the Convolution3dLayer.
Definition: Descriptors.hpp:588
armnn::BroadcastToDescriptor::operator==
bool operator==(const BroadcastToDescriptor &rhs) const
Definition: Descriptors.hpp:1669
armnn::ReshapeDescriptor::m_TargetShape
TensorShape m_TargetShape
Target shape value.
Definition: Descriptors.hpp:1039
armnn::ComparisonDescriptor::operator==
bool operator==(const ComparisonDescriptor &rhs) const
Definition: Descriptors.hpp:99
armnn::BaseDescriptor
Base class for all descriptors.
Definition: Descriptors.hpp:22
armnn::TransposeConvolution2dDescriptor::m_StrideY
uint32_t m_StrideY
Stride value when proceeding through input for the height dimension.
Definition: Descriptors.hpp:1479
armnn::ReshapeDescriptor::ReshapeDescriptor
ReshapeDescriptor()
Definition: Descriptors.hpp:1025
armnn::ReshapeDescriptor::ReshapeDescriptor
ReshapeDescriptor(const TensorShape &shape)
Definition: Descriptors.hpp:1029
armnn::ResizeMethod::NearestNeighbor
@ NearestNeighbor
armnn::StridedSliceDescriptor::m_EndMask
int32_t m_EndMask
End mask value.
Definition: Descriptors.hpp:1353
armnn::Pooling2dDescriptor::m_PadLeft
uint32_t m_PadLeft
Padding left value in the width dimension.
Definition: Descriptors.hpp:407
armnn::PermuteDescriptor::m_DimMappings
PermutationVector m_DimMappings
Indicates how to translate tensor elements from a given source into the target destination,...
Definition: Descriptors.hpp:173
armnn::ActivationFunction
ActivationFunction
Definition: Types.hpp:86
armnn::StandInDescriptor::m_NumOutputs
uint32_t m_NumOutputs
Number of output tensors.
Definition: Descriptors.hpp:1299
armnn::Pooling3dDescriptor::m_PadFront
uint32_t m_PadFront
Padding front value in the depth dimension.
Definition: Descriptors.hpp:483
armnn::StackDescriptor::m_InputShape
TensorShape m_InputShape
Required shape of all input tensors.
Definition: Descriptors.hpp:1277
armnn::UnaryOperation
UnaryOperation
Definition: Types.hpp:125
armnn::Convolution2dDescriptor::m_StrideX
uint32_t m_StrideX
Stride value when proceeding through input for the width dimension.
Definition: Descriptors.hpp:574
armnn::QLstmDescriptor::m_OutputIntermediateScale
float m_OutputIntermediateScale
Output intermediate quantization scale.
Definition: Descriptors.hpp:1432
armnn::Convolution2dDescriptor::m_PadRight
uint32_t m_PadRight
Padding right value in the width dimension.
Definition: Descriptors.hpp:568
armnn::BatchMatMulDescriptor::operator==
bool operator==(const BatchMatMulDescriptor &rhs) const
Definition: Descriptors.hpp:1600
armnn::OriginsDescriptor::SetConcatAxis
void SetConcatAxis(unsigned int concatAxis)
Set the concatenation axis value.
Definition: Descriptors.cpp:158
armnn::PermuteDescriptor::PermuteDescriptor
PermuteDescriptor()
Definition: Descriptors.hpp:151
armnn::DetectionPostProcessDescriptor::m_DetectionsPerClass
uint32_t m_DetectionsPerClass
Detections per classes, used in Regular NMS.
Definition: Descriptors.hpp:749
armnn::DetectionPostProcessDescriptor::DetectionPostProcessDescriptor
DetectionPostProcessDescriptor()
Definition: Descriptors.hpp:715
armnn::DetectionPostProcessDescriptor::m_ScaleH
float m_ScaleH
Center size encoding scale height.
Definition: Descriptors.hpp:765
armnn::ChannelShuffleDescriptor::ChannelShuffleDescriptor
ChannelShuffleDescriptor(const uint32_t &numGroups, const uint32_t &axis)
Definition: Descriptors.hpp:1568
armnn::DataType::Signed32
@ Signed32
armnn::StandInDescriptor::operator==
bool operator==(const StandInDescriptor &rhs) const
Definition: Descriptors.hpp:1290
armnn::ReduceDescriptor::m_KeepDims
bool m_KeepDims
if true then output shape has no change.
Definition: Descriptors.hpp:1554
armnn::BatchToSpaceNdDescriptor
A BatchToSpaceNdDescriptor for the BatchToSpaceNdLayer.
Definition: Descriptors.hpp:875
armnn::ArgMinMaxDescriptor::operator==
bool operator==(const ArgMinMaxDescriptor &rhs) const
Definition: Descriptors.hpp:75
armnn::Convolution2dDescriptor
A Convolution2dDescriptor for the Convolution2dLayer.
Definition: Descriptors.hpp:534
armnn::ActivationFunction::Abs
@ Abs
armnn::PreCompiledDescriptor::m_NumOutputSlots
unsigned int m_NumOutputSlots
Definition: Descriptors.hpp:1376
armnn::DepthwiseConvolution2dDescriptor::m_PadBottom
uint32_t m_PadBottom
Padding bottom value in the height dimension.
Definition: Descriptors.hpp:698
armnn::ComparisonDescriptor
A ComparisonDescriptor for the ComparisonLayer.
Definition: Descriptors.hpp:89
armnn::FillDescriptor
A FillDescriptor for the FillLayer.
Definition: Descriptors.hpp:925
armnn::ComparisonDescriptor::m_Operation
ComparisonOperation m_Operation
Specifies the comparison operation to execute.
Definition: Descriptors.hpp:105
armnn::LstmDescriptor::m_OutputIntermediateScale
float m_OutputIntermediateScale
Output intermediate quantization scale.
Definition: Descriptors.hpp:1162
armnn::SpaceToDepthDescriptor::SpaceToDepthDescriptor
SpaceToDepthDescriptor()
Definition: Descriptors.hpp:1077
armnn::Pooling3dDescriptor::m_PadRight
uint32_t m_PadRight
Padding right value in the width dimension.
Definition: Descriptors.hpp:477
armnn::ElementwiseUnaryDescriptor::m_Operation
UnaryOperation m_Operation
Specifies the elementwiseUnary operation to execute.
Definition: Descriptors.hpp:145
armnn::ViewsDescriptor::ViewsDescriptor
ViewsDescriptor()
Definition: Descriptors.cpp:216
armnn::ViewsDescriptor::operator==
bool operator==(const ViewsDescriptor &rhs) const
Definition: Descriptors.cpp:280
armnn::ArgMinMaxFunction::Min
@ Min
armnn::StridedSliceDescriptor::m_ShrinkAxisMask
int32_t m_ShrinkAxisMask
Shrink axis mask value. If set, the nth specification shrinks the dimensionality by 1.
Definition: Descriptors.hpp:1355
armnn::StandInDescriptor
A StandInDescriptor for the StandIn layer.
Definition: Descriptors.hpp:1281
armnn::FusedKernelType
FusedKernelType
Definition: Types.hpp:266
armnn::ViewsDescriptor::operator=
ViewsDescriptor & operator=(ViewsDescriptor rhs)
Definition: Descriptors.cpp:274
armnn::Pooling2dDescriptor::m_StrideX
uint32_t m_StrideX
Stride value when proceeding through input for the width dimension.
Definition: Descriptors.hpp:419
armnn::ElementwiseUnaryDescriptor::ElementwiseUnaryDescriptor
ElementwiseUnaryDescriptor(UnaryOperation operation)
Definition: Descriptors.hpp:135
armnn::SpaceToDepthDescriptor::m_BlockSize
unsigned int m_BlockSize
Scalar specifying the input block size. It must be >= 1.
Definition: Descriptors.hpp:1092
armnn::CreateDescriptorForConcatenation
OriginsDescriptor CreateDescriptorForConcatenation(TensorShapeIt first, TensorShapeIt last, unsigned int concatenationDimension)
Convenience template to create an OriginsDescriptor to use when creating a ConcatLayer for performing...
Definition: Descriptors.hpp:300
armnn::ResizeDescriptor::m_TargetWidth
uint32_t m_TargetWidth
Target width value.
Definition: Descriptors.hpp:1007
armnn::Pooling3dDescriptor::m_PoolHeight
uint32_t m_PoolHeight
Pooling height value.
Definition: Descriptors.hpp:489
armnn::StridedSliceDescriptor::m_Stride
std::vector< int > m_Stride
Stride values for the input that will be sliced.
Definition: Descriptors.hpp:1346
armnn::LogicalBinaryOperation::LogicalAnd
@ LogicalAnd
armnn::InstanceNormalizationDescriptor::m_DataLayout
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
Definition: Descriptors.hpp:871
armnn::ElementwiseUnaryDescriptor::operator==
bool operator==(const ElementwiseUnaryDescriptor &rhs) const
Definition: Descriptors.hpp:139
armnn::LstmDescriptor
An LstmDescriptor for the LstmLayer.
Definition: Descriptors.hpp:1102
armnn::ComparisonOperation
ComparisonOperation
Definition: Types.hpp:109
armnn::StridedSliceDescriptor
A StridedSliceDescriptor for the StridedSliceLayer.
Definition: Descriptors.hpp:1303
armnn::TransposeDescriptor::m_DimMappings
PermutationVector m_DimMappings
Indicates how to translate tensor elements from a given source into the target destination,...
Definition: Descriptors.hpp:1514
armnn::TransposeConvolution2dDescriptor::m_OutputShape
std::vector< unsigned int > m_OutputShape
Definition: Descriptors.hpp:1486
Tensor.hpp
armnn::Status
Status
Definition: Types.hpp:42
armnn::Pooling3dDescriptor::m_PadBack
uint32_t m_PadBack
Padding back value in the depth dimension.
Definition: Descriptors.hpp:485
armnn::ResizeDescriptor::m_AlignCorners
bool m_AlignCorners
Aligned corners.
Definition: Descriptors.hpp:1016
armnn::TileDescriptor::m_Multiples
std::vector< uint32_t > m_Multiples
The vector to multiply the input shape by.
Definition: Descriptors.hpp:1656
armnn::MeanDescriptor::m_Axis
std::vector< unsigned int > m_Axis
Values for the dimensions to reduce.
Definition: Descriptors.hpp:1190
armnn::LstmDescriptor::m_CifgEnabled
bool m_CifgEnabled
Enable/disable cifg (coupled input & forget gate).
Definition: Descriptors.hpp:1146
armnn::LogicalBinaryDescriptor
A LogicalBinaryDescriptor for the LogicalBinaryLayer.
Definition: Descriptors.hpp:1518
armnn::NormalizationDescriptor::m_Alpha
float m_Alpha
Alpha value for the normalization equation.
Definition: Descriptors.hpp:799
armnn::BinaryOperation
BinaryOperation
Definition: Types.hpp:138
armnn::Pooling3dDescriptor::m_StrideX
uint32_t m_StrideX
Stride value when proceeding through input for the width dimension.
Definition: Descriptors.hpp:493
armnn::LstmDescriptor::m_ForgetIntermediateScale
float m_ForgetIntermediateScale
Forget intermediate quantization scale.
Definition: Descriptors.hpp:1158
armnn::Pooling3dDescriptor::m_PadLeft
uint32_t m_PadLeft
Padding left value in the width dimension.
Definition: Descriptors.hpp:475
armnn::QLstmDescriptor::m_HiddenStateZeroPoint
int32_t m_HiddenStateZeroPoint
Hidden State zero point.
Definition: Descriptors.hpp:1434
armnn::Convolution2dDescriptor::m_DilationX
uint32_t m_DilationX
Dilation along x axis.
Definition: Descriptors.hpp:578
armnn::SoftmaxDescriptor::m_Axis
int m_Axis
Scalar, defaulted to the last index (-1), specifying the dimension the activation will be performed o...
Definition: Descriptors.hpp:192
armnn::Convolution3dDescriptor::m_PadBack
uint32_t m_PadBack
Padding back value in the depth dimension.
Definition: Descriptors.hpp:639
armnn::ReduceDescriptor::m_vAxis
std::vector< uint32_t > m_vAxis
The indices of the dimensions to reduce.
Definition: Descriptors.hpp:1556
armnn::PadDescriptor::m_PadList
std::vector< std::pair< unsigned int, unsigned int > > m_PadList
Specifies the padding for input dimension.
Definition: Descriptors.hpp:1218
std
Definition: BackendId.hpp:149
armnn::LstmDescriptor::m_LayerNormEnabled
bool m_LayerNormEnabled
Enable/disable layer normalization.
Definition: Descriptors.hpp:1152
armnn::TransposeConvolution2dDescriptor::m_PadTop
uint32_t m_PadTop
Padding top value in the height dimension.
Definition: Descriptors.hpp:1473
armnn::StridedSliceDescriptor::GetStartForAxis
int GetStartForAxis(const TensorShape &inputShape, unsigned int axis) const
Definition: Descriptors.cpp:392
armnn::ViewsDescriptor::GetNumDimensions
uint32_t GetNumDimensions() const
Get the number of dimensions.
Definition: Descriptors.cpp:306
armnn::TransposeConvolution2dDescriptor::m_PadRight
uint32_t m_PadRight
Padding right value in the width dimension.
Definition: Descriptors.hpp:1471
armnn::FusedDescriptor::m_NumOutputSlots
unsigned int m_NumOutputSlots
Definition: Descriptors.hpp:960
armnn::Convolution3dDescriptor::operator==
bool operator==(const Convolution3dDescriptor &rhs) const
Definition: Descriptors.hpp:607
armnn::Pooling2dDescriptor::Pooling2dDescriptor
Pooling2dDescriptor()
Definition: Descriptors.hpp:373
armnn::Pooling3dDescriptor::operator==
bool operator==(const Pooling3dDescriptor &rhs) const
Definition: Descriptors.hpp:452
armnn::OriginsDescriptor::OriginsDescriptor
OriginsDescriptor()
Definition: Descriptors.cpp:82
armnn::QLstmDescriptor::m_CifgEnabled
bool m_CifgEnabled
Enable/disable CIFG (coupled input & forget gate).
Definition: Descriptors.hpp:1418
armnn::ElementwiseBinaryDescriptor::m_Operation
BinaryOperation m_Operation
Specifies the elementwiseBinary operation to execute.
Definition: Descriptors.hpp:125
armnn::ElementwiseUnaryDescriptor::ElementwiseUnaryDescriptor
ElementwiseUnaryDescriptor()
Definition: Descriptors.hpp:131
armnn::DepthwiseConvolution2dDescriptor::DepthwiseConvolution2dDescriptor
DepthwiseConvolution2dDescriptor()
Definition: Descriptors.hpp:661
armnn::Convolution3dDescriptor::m_DilationY
uint32_t m_DilationY
Dilation along y axis.
Definition: Descriptors.hpp:649
armnn::OriginsDescriptor
An OriginsDescriptor for the ConcatLayer.
Definition: Descriptors.hpp:201
armnn::FullyConnectedDescriptor::GetNumInputs
uint32_t GetNumInputs() const
Get the number of inputs.
Definition: Descriptors.cpp:474
Exceptions.hpp
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
armnn::ElementwiseUnaryDescriptor
A ElementwiseUnaryDescriptor for the ElementwiseUnaryLayer.
Definition: Descriptors.hpp:129
armnn::TransposeConvolution2dDescriptor
A TransposeConvolution2dDescriptor for the TransposeConvolution2dLayer.
Definition: Descriptors.hpp:1440
armnn::Convolution3dDescriptor::m_BiasEnabled
bool m_BiasEnabled
Enable/disable bias.
Definition: Descriptors.hpp:653
Types.hpp
armnn::ArgMinMaxDescriptor::m_Axis
int m_Axis
Axis to reduce across the input tensor.
Definition: Descriptors.hpp:83
armnn::ActivationDescriptor::m_B
float m_B
Beta lower bound value used by the activation functions. (BoundedReLu, Linear, TanH).
Definition: Descriptors.hpp:63
armnn::TileDescriptor::TileDescriptor
TileDescriptor()
Definition: Descriptors.hpp:1642
armnn::OriginsDescriptor::SetViewOriginCoord
Status SetViewOriginCoord(uint32_t view, uint32_t coord, uint32_t value)
@Brief Set the view origin coordinates.
Definition: Descriptors.cpp:167
armnn::Convolution3dDescriptor::m_StrideZ
uint32_t m_StrideZ
Stride value when proceeding through input for the depth dimension.
Definition: Descriptors.hpp:645
armnn::DetectionPostProcessDescriptor::m_UseRegularNms
bool m_UseRegularNms
Use Regular NMS.
Definition: Descriptors.hpp:757
armnn::SpaceToDepthDescriptor::SpaceToDepthDescriptor
SpaceToDepthDescriptor(unsigned int blockSize, DataLayout dataLayout)
Definition: Descriptors.hpp:1081
armnn::ViewsDescriptor::GetNumViews
uint32_t GetNumViews() const
Get the number of views.
Definition: Descriptors.cpp:301
armnn::QLstmDescriptor::m_HiddenStateScale
float m_HiddenStateScale
Hidden State quantization scale.
Definition: Descriptors.hpp:1436
armnn::ReduceOperation
ReduceOperation
Definition: Types.hpp:157
armnn::NormalizationDescriptor::m_K
float m_K
Kappa value used for the across channel normalization equation.
Definition: Descriptors.hpp:803
armnn::ElementwiseBinaryDescriptor::ElementwiseBinaryDescriptor
ElementwiseBinaryDescriptor(BinaryOperation operation)
Definition: Descriptors.hpp:115
armnn::FakeQuantizationDescriptor::m_Min
float m_Min
Minimum value.
Definition: Descriptors.hpp:919
armnn::StridedSliceDescriptor::operator==
bool operator==(const StridedSliceDescriptor &rhs) const
Definition: Descriptors.hpp:1323
armnn::LstmDescriptor::m_ProjectionEnabled
bool m_ProjectionEnabled
Enable/disable the projection layer.
Definition: Descriptors.hpp:1150
armnn::StridedSliceDescriptor::m_End
std::vector< int > m_End
End values for the input that will be sliced.
Definition: Descriptors.hpp:1344
armnn::TileDescriptor::operator==
bool operator==(const TileDescriptor &rhs) const
Definition: Descriptors.hpp:1650
armnn::BatchMatMulDescriptor::BatchMatMulDescriptor
BatchMatMulDescriptor(bool transposeX=false, bool transposeY=false, bool adjointX=false, bool adjointY=false, DataLayout dataLayoutX=DataLayout::NCHW, DataLayout dataLayoutY=DataLayout::NCHW)
Definition: Descriptors.hpp:1586
armnn::BaseDescriptor::IsNull
virtual bool IsNull() const
Definition: Descriptors.hpp:24
armnn::PadDescriptor::m_PaddingMode
PaddingMode m_PaddingMode
Specifies the Padding mode (Constant, Reflect or Symmetric)
Definition: Descriptors.hpp:1224
armnn::NormalizationDescriptor::operator==
bool operator==(const NormalizationDescriptor &rhs) const
Definition: Descriptors.hpp:781
armnn::Pooling2dDescriptor::m_OutputShapeRounding
OutputShapeRounding m_OutputShapeRounding
The rounding method for the output shape. (Floor, Ceiling).
Definition: Descriptors.hpp:423
armnn::BatchToSpaceNdDescriptor::BatchToSpaceNdDescriptor
BatchToSpaceNdDescriptor(std::vector< unsigned int > blockShape, std::vector< std::pair< unsigned int, unsigned int >> crops)
Definition: Descriptors.hpp:883
armnn::PoolingAlgorithm
PoolingAlgorithm
Definition: Types.hpp:150
armnn::TransposeConvolution2dDescriptor::operator==
bool operator==(const TransposeConvolution2dDescriptor &rhs) const
Definition: Descriptors.hpp:1454
armnn::TransposeConvolution2dDescriptor::m_OutputShapeEnabled
bool m_OutputShapeEnabled
Output shape if it has been specified.
Definition: Descriptors.hpp:1485
armnn::TransposeConvolution2dDescriptor::m_BiasEnabled
bool m_BiasEnabled
Enable/disable bias.
Definition: Descriptors.hpp:1481
armnn::QLstmDescriptor::m_CellClip
float m_CellClip
Clipping threshold value for the cell state.
Definition: Descriptors.hpp:1414
armnn::DetectionPostProcessDescriptor
Definition: Descriptors.hpp:713
armnn::LstmDescriptor::LstmDescriptor
LstmDescriptor()
Definition: Descriptors.hpp:1104
armnn::QLstmDescriptor::m_LayerNormEnabled
bool m_LayerNormEnabled
Enable/disable layer normalization.
Definition: Descriptors.hpp:1424
armnn::PreCompiledDescriptor
A PreCompiledDescriptor for the PreCompiledLayer.
Definition: Descriptors.hpp:1367
armnn::ViewsDescriptor::swap
friend void swap(ViewsDescriptor &first, ViewsDescriptor &second)
Swap the ViewsDescriptor value first and second.
Definition: Descriptors.cpp:365
armnn::BaseDescriptor::~BaseDescriptor
virtual ~BaseDescriptor()=default
armnn::ChannelShuffleDescriptor::m_NumGroups
uint32_t m_NumGroups
Number of groups for the channel shuffle operation.
Definition: Descriptors.hpp:1578
armnn::ElementwiseBinaryDescriptor::ElementwiseBinaryDescriptor
ElementwiseBinaryDescriptor()
Definition: Descriptors.hpp:111
armnn::Convolution3dDescriptor::m_DataLayout
DataLayout m_DataLayout
The data layout to be used (NDHWC, NCDHW).
Definition: Descriptors.hpp:655
armnn::L2NormalizationDescriptor::m_Eps
float m_Eps
Used to avoid dividing by zero.
Definition: Descriptors.hpp:822
armnn::SliceDescriptor::operator==
bool operator==(const SliceDescriptor &rhs) const
Definition: Descriptors.hpp:1238
armnn::OriginsDescriptor::GetViewOrigin
const uint32_t * GetViewOrigin(uint32_t idx) const
Return the view origin at the int value idx.
Definition: Descriptors.cpp:197
armnn::TransposeConvolution2dDescriptor::m_DataLayout
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
Definition: Descriptors.hpp:1483
armnn::SliceDescriptor::m_Size
std::vector< unsigned int > m_Size
Size of the slice in each dimension.
Definition: Descriptors.hpp:1247
armnn::Pooling2dDescriptor
A Pooling2dDescriptor for the Pooling2dLayer.
Definition: Descriptors.hpp:371
armnn::LstmDescriptor::m_ActivationFunc
uint32_t m_ActivationFunc
The activation function to use.
Definition: Descriptors.hpp:1140
armnn::MeanDescriptor::MeanDescriptor
MeanDescriptor()
Definition: Descriptors.hpp:1174
armnn::ReduceDescriptor::operator==
bool operator==(const ReduceDescriptor &rhs) const
Definition: Descriptors.hpp:1546
armnn::NormalizationAlgorithmChannel
NormalizationAlgorithmChannel
Definition: Types.hpp:207
armnn::BatchToSpaceNdDescriptor::m_DataLayout
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
Definition: Descriptors.hpp:902
armnn::BroadcastToDescriptor
Definition: Descriptors.hpp:1659
armnn::DepthwiseConvolution2dDescriptor
A DepthwiseConvolution2dDescriptor for the DepthwiseConvolution2dLayer.
Definition: Descriptors.hpp:659
armnn::ComparisonOperation::Equal
@ Equal
armnn::ReduceDescriptor
A ReduceDescriptor for the REDUCE operators.
Definition: Descriptors.hpp:1538
armnn::DepthwiseConvolution2dDescriptor::m_DilationX
uint32_t m_DilationX
Dilation factor value for width dimension.
Definition: Descriptors.hpp:704
armnn::BatchNormalizationDescriptor::m_Eps
float m_Eps
Value to add to the variance. Used to avoid dividing by zero.
Definition: Descriptors.hpp:841
armnn::SoftmaxDescriptor::SoftmaxDescriptor
SoftmaxDescriptor()
Definition: Descriptors.hpp:179
armnn::FakeQuantizationDescriptor
A FakeQuantizationDescriptor for the FakeQuantizationLayer.
Definition: Descriptors.hpp:906
armnn::LstmDescriptor::m_ClippingThresCell
float m_ClippingThresCell
Clipping threshold value for the cell state.
Definition: Descriptors.hpp:1142
armnn::Pooling3dDescriptor::m_PoolDepth
uint32_t m_PoolDepth
Pooling depth value.
Definition: Descriptors.hpp:491
armnn::BatchMatMulDescriptor::GetAxesNotMul
static std::vector< unsigned int > GetAxesNotMul(DataLayout dataLayout, const TensorShape &tensorShape)
Static helper to get the axes (for each input) that will not be multiplied together.
Definition: Descriptors.cpp:505
armnn::PaddingMethod
PaddingMethod
The padding method modifies the output of pooling layers.
Definition: Types.hpp:188
armnn::StridedSliceDescriptor::m_NewAxisMask
int32_t m_NewAxisMask
New axis mask value.
Definition: Descriptors.hpp:1360
armnn::MeanDescriptor
A MeanDescriptor for the MeanLayer.
Definition: Descriptors.hpp:1172
armnn::QLstmDescriptor::m_PeepholeEnabled
bool m_PeepholeEnabled
Enable/disable peephole.
Definition: Descriptors.hpp:1420
armnn::TileDescriptor
Definition: Descriptors.hpp:1640
armnn::ReshapeDescriptor::operator==
bool operator==(const ReshapeDescriptor &rhs) const
Definition: Descriptors.hpp:1033
armnn::ActivationDescriptor::operator==
bool operator==(const ActivationDescriptor &rhs) const
Definition: Descriptors.hpp:52
armnn::ViewsDescriptor::~ViewsDescriptor
~ViewsDescriptor()
Definition: Descriptors.cpp:262
armnn::PaddingMode::Constant
@ Constant
armnn::L2NormalizationDescriptor::L2NormalizationDescriptor
L2NormalizationDescriptor()
Definition: Descriptors.hpp:811
armnn::SoftmaxDescriptor
A SoftmaxDescriptor for the SoftmaxLayer.
Definition: Descriptors.hpp:177
armnn::FillDescriptor::operator==
bool operator==(const FillDescriptor &rhs) const
Definition: Descriptors.hpp:935
armnn::Pooling2dDescriptor::m_PoolType
PoolingAlgorithm m_PoolType
The pooling algorithm to use (Max. Average, L2).
Definition: Descriptors.hpp:405
armnn::InstanceNormalizationDescriptor::m_Eps
float m_Eps
Epsilon, small scalar value added to variance to avoid dividing by zero. Defaults to 1e-12f.
Definition: Descriptors.hpp:869
armnn::FakeQuantizationDescriptor::FakeQuantizationDescriptor
FakeQuantizationDescriptor()
Definition: Descriptors.hpp:908
armnn::SpaceToDepthDescriptor
A SpaceToDepthDescriptor for the SpaceToDepthLayer.
Definition: Descriptors.hpp:1075
armnn::ReduceDescriptor::ReduceDescriptor
ReduceDescriptor()
Definition: Descriptors.hpp:1540
armnn::ViewsDescriptor::SetAxis
void SetAxis(int32_t axis)
Set the axis value.
Definition: Descriptors.cpp:374
armnn::ActivationDescriptor::ActivationDescriptor
ActivationDescriptor(armnn::ActivationFunction activation, float a=0, float b=0)
Definition: Descriptors.hpp:44
armnn::DataLayout::NCHW
@ NCHW
armnn::LstmDescriptor::m_CellIntermediateScale
float m_CellIntermediateScale
Cell intermediate quantization scale.
Definition: Descriptors.hpp:1160
armnn::ViewsDescriptor::GetViewOrigin
const uint32_t * GetViewOrigin(uint32_t idx) const
Get the view origin at the int value idx.
Definition: Descriptors.cpp:311
armnn::DepthwiseConvolution2dDescriptor::GetNumInputs
uint32_t GetNumInputs() const
Get the number of views/inputs.
Definition: Descriptors.cpp:479
armnn::ActivationFunction::Sigmoid
@ Sigmoid
armnn::Convolution2dDescriptor::operator==
bool operator==(const Convolution2dDescriptor &rhs) const
Definition: Descriptors.hpp:549
armnn::OriginsDescriptor::operator==
bool operator==(const OriginsDescriptor &rhs) const
Definition: Descriptors.cpp:135
armnn::SpaceToDepthDescriptor::m_DataLayout
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
Definition: Descriptors.hpp:1095
armnn::DepthwiseConvolution2dDescriptor::m_StrideX
uint32_t m_StrideX
Stride value when proceeding through input for the width dimension.
Definition: Descriptors.hpp:700
armnn::DepthwiseConvolution2dDescriptor::m_PadTop
uint32_t m_PadTop
Padding top value in the height dimension.
Definition: Descriptors.hpp:696