ArmNN
 21.08
SerializeLayerParameters.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
6 #include <armnn/TypesUtils.hpp>
7 #include <string>
8 #include <iostream>
9 #include <sstream>
10 
11 namespace armnn
12 {
13 
15  const ActivationDescriptor& desc)
16 {
17  fn("Function", GetActivationFunctionAsCString(desc.m_Function));
18  fn("A", std::to_string(desc.m_A));
19  fn("B", std::to_string(desc.m_B));
20 }
21 
23  const BatchNormalizationDescriptor& desc)
24 {
25  fn("Eps", std::to_string(desc.m_Eps));
26  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
27 }
28 
30  const BatchToSpaceNdDescriptor& desc)
31 {
32  {
33  std::stringstream ss;
34  int count = 0;
35  for (auto&& var : desc.m_BlockShape)
36  {
37  if (count > 0)
38  {
39  ss << ",";
40  }
41  ss << var;
42  ++count;
43  }
44  fn("BlockShape", ss.str());
45  }
46 
47  {
48  std::stringstream ss;
49  int count = 0;
50  for (auto&& var : desc.m_Crops)
51  {
52  if (count > 0)
53  {
54  ss << ",";
55  }
56  ss << "[" << var.first << "," << var.second << "]";
57  ++count;
58  }
59  fn("Crops", ss.str());
60  }
61 
62  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
63 }
64 
66  const ComparisonDescriptor& desc)
67 {
68  fn("Operation", GetComparisonOperationAsCString(desc.m_Operation));
69 }
70 
72  const Convolution2dDescriptor& desc)
73 {
74  {
75  std::stringstream ss;
76  ss << "(" << desc.m_PadTop << "," << desc.m_PadLeft
77  << "," << desc.m_PadBottom << "," << desc.m_PadRight << ")";
78  fn("Padding(T,L,B,R)",ss.str());
79  }
80 
81  {
82  std::stringstream ss;
83  ss << "(" << desc.m_StrideX << "," << desc.m_StrideY << ")";
84  fn("Stride(X,Y)", ss.str());
85  }
86 
87  {
88  std::stringstream ss;
89  ss << "(" << desc.m_DilationX << "," << desc.m_DilationY << ")";
90  fn("Dilation(X,Y)", ss.str());
91  }
92 
93  fn("BiasEnabled",(desc.m_BiasEnabled ? "true" : "false"));
94  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
95 }
96 
99 {
100  fn("MaxDetections", std::to_string(desc.m_MaxDetections));
101  fn("MaxClassesPerDetection", std::to_string(desc.m_MaxClassesPerDetection));
102  fn("DetectionsPerClass", std::to_string(desc.m_DetectionsPerClass));
103  fn("NmsScoreThreshold", std::to_string(desc.m_NmsScoreThreshold));
104  fn("NmsIouThreshold", std::to_string(desc.m_NmsIouThreshold));
105  fn("NumClasses", std::to_string(desc.m_NumClasses));
106  fn("UseRegularNms", (desc.m_UseRegularNms ? "true" : "false"));
107  {
108  std::stringstream ss;
109  ss << "(" << desc.m_ScaleX << "," << desc.m_ScaleY << ")";
110  fn("Scale(X,Y)", ss.str());
111  }
112 
113  {
114  std::stringstream ss;
115  ss << "(" << desc.m_ScaleW << "," << desc.m_ScaleH << ")";
116  fn("Scale(W,H)", ss.str());
117  }
118 }
119 
123 {
124  {
125  std::stringstream ss;
126  ss << "(" << desc.m_PadTop << "," << desc.m_PadLeft
127  << "," << desc.m_PadBottom << "," << desc.m_PadRight << ")";
128  fn("Padding(T,L,B,R)",ss.str());
129  }
130 
131  {
132  std::stringstream ss;
133  ss << "(" << desc.m_StrideX << "," << desc.m_StrideY << ")";
134  fn("Stride(X,Y)", ss.str());
135  }
136 
137  {
138  std::stringstream ss;
139  ss << "(" << desc.m_DilationX << "," << desc.m_DilationY << ")";
140  fn("Dilation(X,Y)", ss.str());
141  }
142 
143  fn("BiasEnabled",(desc.m_BiasEnabled ? "true" : "false"));
144  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
145 }
146 
148  const ElementwiseUnaryDescriptor& desc)
149 {
150  fn("UnaryOperation", GetUnaryOperationAsCString(desc.m_Operation));
151 }
152 
154  const FakeQuantizationDescriptor& desc)
155 {
156  fn("Min", std::to_string(desc.m_Min));
157  fn("Max", std::to_string(desc.m_Max));
158 }
159 
161  const FullyConnectedDescriptor& desc)
162 {
163  fn("BiasEnabled", (desc.m_BiasEnabled ? "true" : "false"));
164  fn("TransposeWeightMatrix", (desc.m_TransposeWeightMatrix ? "true" : "false"));
165 }
166 
168  const L2NormalizationDescriptor& desc)
169 {
170  fn("Eps", std::to_string(desc.m_Eps));
171  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
172 }
173 
175 {
176  fn("ActivationFunc", std::to_string(desc.m_ActivationFunc));
177  fn("ClippingThresCell", std::to_string(desc.m_ClippingThresCell));
178  fn("ClippingThresProj", std::to_string(desc.m_ClippingThresProj));
179  fn("CifgEnabled", (desc.m_CifgEnabled ? "true" : "false")) ;
180  fn("PeepholeEnabled", (desc.m_PeepholeEnabled ? "true" : "false")) ;
181  fn("ProjectionEnabled", (desc.m_ProjectionEnabled ? "true" : "false")) ;
182  fn("LayerNormEnabled", (desc.m_LayerNormEnabled ? "true" : "false"));
183 }
184 
186 {
187  {
188  std::stringstream ss;
189  int count = 0;
190  for (auto&& var : desc.m_Axis)
191  {
192  if (count > 0)
193  {
194  ss << ",";
195  }
196  ss << var;
197  ++count;
198  }
199  fn("Axis", ss.str());
200  }
201  fn("KeepDims", (desc.m_KeepDims ? "true" : "false"));
202 }
203 
205  const NormalizationDescriptor& desc)
206 {
209  fn("NormSize", std::to_string(desc.m_NormSize));
210  fn("Alpha", std::to_string(desc.m_Alpha));
211  fn("Beta", std::to_string(desc.m_Beta));
212  fn("K", std::to_string(desc.m_K));
213  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
214 }
215 
217  const OriginsDescriptor& desc)
218 {
219  fn("ConcatAxis", std::to_string(desc.GetConcatAxis()));
220 
221  uint32_t numViews = desc.GetNumViews();
222  uint32_t numDims = desc.GetNumDimensions();
223 
224  for (uint32_t view = 0; view < numViews; ++view)
225  {
226  std::stringstream key;
227  key << "MergeTo#" << view;
228  std::stringstream value;
229  value << "[";
230  auto viewData = desc.GetViewOrigin(view);
231 
232  for (uint32_t dim = 0; dim < numDims; ++dim)
233  {
234  if (dim > 0)
235  {
236  value << ",";
237  }
238  value << viewData[dim];
239  }
240  value << "]";
241  fn(key.str(), value.str());
242  }
243 }
244 
246 {
247  {
248  std::stringstream ss;
249  int count = 0;
250  for (auto&& var : desc.m_PadList)
251  {
252  if (count > 0)
253  {
254  ss << ",";
255  }
256  ss << "[" << var.first << "," << var.second << "]";
257  ++count;
258  }
259  fn("PadList", ss.str());
260  }
261  fn("PadValue", std::to_string(desc.m_PadValue));
262 }
263 
265  const PreCompiledDescriptor& desc)
266 {
267  fn("NumInputSlots", std::to_string(desc.m_NumInputSlots));
268  fn("NumOutputSlots", std::to_string(desc.m_NumOutputSlots));
269 }
270 
272  const Pooling2dDescriptor& desc)
273 {
274  fn("Type", GetPoolingAlgorithmAsCString(desc.m_PoolType));
275  {
276  std::stringstream ss;
277  ss << "(" << desc.m_PadTop << "," << desc.m_PadLeft
278  << "," << desc.m_PadBottom << "," << desc.m_PadRight << ")";
279  fn("Padding(T,L,B,R)", ss.str());
280  }
281 
282  {
283  std::stringstream ss;
284  ss << "(" << desc.m_PoolWidth << "," << desc.m_PoolHeight << ")";
285  fn("(Width,Height)", ss.str());
286  }
287 
288  {
289  std::stringstream ss;
290  ss << "(" << desc.m_StrideX << "," << desc.m_StrideY << ")";
291  fn("Stride(X,Y)", ss.str());
292  }
293 
294  fn("OutputShapeRounding", GetOutputShapeRoundingAsCString(desc.m_OutputShapeRounding));
295  fn("PaddingMethod", GetPaddingMethodAsCString(desc.m_PaddingMethod));
296  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
297 }
298 
300  const PermuteDescriptor& desc)
301 {
302  std::stringstream ss;
303  ss << "[";
304  bool addComma = false;
305  for (auto it : desc.m_DimMappings)
306  {
307  if (addComma)
308  {
309  ss << ",";
310  }
311  ss << it;
312  addComma = true;
313  }
314  ss << "]";
315 
316  fn("DimMappings",ss.str());
317 }
318 
320 {
321  {
322  std::stringstream ss;
323  int count = 0;
324  for (auto&& var : desc.m_vAxis)
325  {
326  if (count > 0)
327  {
328  ss << ",";
329  }
330  ss << var;
331  ++count;
332  }
333  fn("Axis", ss.str());
334  }
335  fn("KeepDims", (desc.m_KeepDims ? "true" : "false"));
336  fn("ReduceOperation", GetReduceOperationAsCString(desc.m_ReduceOperation));
337 }
338 
340  const ReshapeDescriptor& desc)
341 {
342  std::stringstream ss;
343  ss << desc.m_TargetShape;
344  fn("TargetShape",ss.str());
345 }
346 
348  const ResizeBilinearDescriptor& desc)
349 {
350  fn("TargetWidth", std::to_string(desc.m_TargetWidth));
351  fn("TargetHeight", std::to_string(desc.m_TargetHeight));
352  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
353  fn("AlignCorners", std::to_string(desc.m_AlignCorners));
354  fn("HalfPixelCenters", std::to_string(desc.m_HalfPixelCenters));
355 }
356 
358  const ResizeDescriptor& desc)
359 {
360  fn("TargetWidth", std::to_string(desc.m_TargetWidth));
361  fn("TargetHeight", std::to_string(desc.m_TargetHeight));
362  fn("ResizeMethod", GetResizeMethodAsCString(desc.m_Method));
363  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
364  fn("AlignCorners", std::to_string(desc.m_AlignCorners));
365  fn("HalfPixelCenters", std::to_string(desc.m_HalfPixelCenters));
366 }
367 
369  const SoftmaxDescriptor& desc)
370 {
371  fn("Beta", std::to_string(desc.m_Beta));
372  fn("Axis", std::to_string(desc.m_Axis));
373 }
374 
376  const SpaceToBatchNdDescriptor& desc)
377 {
378  {
379  std::stringstream ss;
380  int count = 0;
381  for (auto&& var : desc.m_BlockShape)
382  {
383  if (count > 0)
384  {
385  ss << ",";
386  }
387  ss << var;
388  ++count;
389  }
390  fn("BlockShape", ss.str());
391  }
392 
393  {
394  std::stringstream ss;
395  int count = 0;
396  for (auto&& var : desc.m_PadList)
397  {
398  if (count > 0)
399  {
400  ss << ",";
401  }
402  ss << "[" << var.first << "," << var.second << "]";
403  ++count;
404  }
405  fn("PadList", ss.str());
406  }
407 
408  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
409 }
410 
412  const SpaceToDepthDescriptor& desc)
413 {
414  fn("BlockSize", std::to_string(desc.m_BlockSize));
415  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
416 }
417 
419 {
420  fn("Axis", std::to_string(desc.m_Axis));
421  fn("NumInputs", std::to_string(desc.m_NumInputs));
422  {
423  std::stringstream ss;
424  ss << desc.m_InputShape;
425  fn("InputShape",ss.str());
426  }
427 }
428 
430  const StridedSliceDescriptor& desc)
431 {
432  {
433  std::stringstream ss;
434  int count = 0;
435  for (auto&& var : desc.m_Begin)
436  {
437  if (count > 0)
438  {
439  ss << ",";
440  }
441  ss << var;
442  ++count;
443  }
444  fn("Begin", ss.str());
445  }
446 
447  {
448  std::stringstream ss;
449  int count = 0;
450  for (auto&& var : desc.m_End)
451  {
452  if (count > 0)
453  {
454  ss << ",";
455  }
456  ss << var;
457  ++count;
458  }
459  fn("End", ss.str());
460  }
461 
462  {
463  std::stringstream ss;
464  int count = 0;
465  for (auto&& var : desc.m_Stride)
466  {
467  if (count > 0)
468  {
469  ss << ",";
470  }
471  ss << var;
472  ++count;
473  }
474  fn("Stride", ss.str());
475  }
476 
477  fn("BeginMask", std::to_string(desc.m_BeginMask));
478  fn("EndMask", std::to_string(desc.m_EndMask));
479  fn("ShrinkAxisMask", std::to_string(desc.m_ShrinkAxisMask));
480  fn("EllipsisMask", std::to_string(desc.m_EllipsisMask));
481  fn("NewAxisMask", std::to_string(desc.m_NewAxisMask));
482  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
483 }
484 
488 {
489  {
490  std::stringstream ss;
491  ss << "(" << desc.m_PadTop << "," << desc.m_PadLeft
492  << "," << desc.m_PadBottom << "," << desc.m_PadRight << ")";
493  fn("Padding(T,L,B,R)",ss.str());
494  }
495 
496  {
497  std::stringstream ss;
498  ss << "(" << desc.m_StrideX << "," << desc.m_StrideY << ")";
499  fn("Stride(X,Y)", ss.str());
500  }
501 
502  fn("BiasEnabled", (desc.m_BiasEnabled ? "true" : "false"));
503  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
504 }
505 
507  const TransposeDescriptor& desc)
508 {
509  std::stringstream ss;
510  ss << "[";
511  bool addComma = false;
512  for (auto it : desc.m_DimMappings)
513  {
514  if (addComma)
515  {
516  ss << ",";
517  }
518  ss << it;
519  addComma = true;
520  }
521  ss << "]";
522 
523  fn("DimMappings",ss.str());
524 }
525 
527 {
528  uint32_t numViews = desc.GetNumViews();
529  uint32_t numDims = desc.GetNumDimensions();
530  for (uint32_t view = 0; view < numViews; ++view) {
531  std::stringstream key;
532  key << "ViewSizes#" << view;
533  std::stringstream value;
534  value << "[";
535  auto viewData = desc.GetViewSizes(view);
536  for (uint32_t dim = 0; dim < numDims; ++dim)
537  {
538  if (dim > 0)
539  {
540  value << ",";
541  }
542  value << viewData[dim];
543  }
544  value << "]";
545  fn(key.str(), value.str());
546  }
548 }
549 
550 } // namespace armnn
uint32_t m_PadBottom
Padding bottom value in the height dimension.
bool m_BiasEnabled
Enable/disable bias.
float m_Eps
Used to avoid dividing by zero.
bool m_HalfPixelCenters
Half Pixel Centers.
bool m_ProjectionEnabled
Enable/disable the projection layer.
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
bool m_AlignCorners
Aligned corners.
UnaryOperation m_Operation
Specifies the elementwiseUnary operation to execute.
uint32_t m_Axis
0-based axis along which to stack the input tensors.
A ViewsDescriptor for the SplitterLayer.
constexpr const char * GetDataLayoutName(DataLayout dataLayout)
Definition: TypesUtils.hpp:216
float m_ScaleW
Center size encoding scale weight.
uint32_t m_PadBottom
Padding bottom value in the height dimension.
bool m_BiasEnabled
Enable/disable bias.
float m_K
Kappa value used for the across channel normalization equation.
int m_Axis
Scalar, defaulted to the last index (-1), specifying the dimension the activation will be performed o...
A TransposeConvolution2dDescriptor for the TransposeConvolution2dLayer.
uint32_t m_PadBottom
Padding bottom value in the height dimension.
uint32_t m_PadLeft
Padding left value in the width dimension.
float m_ClippingThresProj
Clipping threshold value for the projection.
int32_t m_ShrinkAxisMask
Shrink axis mask value. If set, the nth specification shrinks the dimensionality by 1...
A ReshapeDescriptor for the ReshapeLayer.
std::vector< int > m_Begin
Begin values for the input that will be sliced.
constexpr const char * GetResizeMethodAsCString(ResizeMethod method)
Definition: TypesUtils.hpp:246
float m_PadValue
Optional value to use for padding, defaults to 0.
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
uint32_t GetNumDimensions() const
Get the number of dimensions.
A ComparisonDescriptor for the ComparisonLayer.
Definition: Descriptors.hpp:78
float m_ScaleX
Center size encoding scale x.
TensorShape m_InputShape
Required shape of all input tensors.
uint32_t m_TargetWidth
Target width value.
bool m_TransposeWeightMatrix
Enable/disable transpose weight matrix.
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
uint32_t m_PoolWidth
Pooling width value.
A Convolution2dDescriptor for the Convolution2dLayer.
float m_Alpha
Alpha value for the normalization equation.
uint32_t m_PadLeft
Padding left value in the width dimension.
bool m_KeepDims
if true then output shape has no change.
bool m_BiasEnabled
Enable/disable bias.
ResizeMethod m_Method
The Interpolation method to use (Bilinear, NearestNeighbor).
float m_Beta
Exponentiation value.
float m_Eps
Value to add to the variance. Used to avoid dividing by zero.
PaddingMethod m_PaddingMethod
The padding method to be used. (Exclude, IgnoreValue).
uint32_t m_DetectionsPerClass
Detections per classes, used in Regular NMS.
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
uint32_t m_PadTop
Padding top value in the height dimension.
constexpr char const * GetPoolingAlgorithmAsCString(PoolingAlgorithm pooling)
Definition: TypesUtils.hpp:97
uint32_t m_PadRight
Padding right value in the width dimension.
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
std::vector< std::pair< unsigned int, unsigned int > > m_PadList
Specifies the padding for input dimension.
uint32_t GetNumViews() const
Get the number of views.
ReduceOperation m_ReduceOperation
Specifies the reduction operation to execute.
Copyright (c) 2021 ARM Limited and Contributors.
uint32_t m_PadBottom
Padding bottom value in the height dimension.
int32_t m_BeginMask
Begin mask value.
constexpr char const * GetOutputShapeRoundingAsCString(OutputShapeRounding rounding)
Definition: TypesUtils.hpp:108
uint32_t m_DilationY
Dilation along y axis.
int32_t m_EndMask
End mask value.
A SpaceToDepthDescriptor for the SpaceToDepthLayer.
std::vector< std::pair< unsigned int, unsigned int > > m_PadList
Specifies the padding values for the input dimension: heightPad{top, bottom} widthPad{left, right}.
uint32_t m_DilationY
Dilation factor value for height dimension.
A BatchToSpaceNdDescriptor for the BatchToSpaceNdLayer.
uint32_t m_StrideX
Stride value when proceeding through input for the width dimension.
PermutationVector m_DimMappings
Indicates how to translate tensor elements from a given source into the target destination, when source and target potentially have different memory layouts e.g.
NormalizationAlgorithmMethod m_NormMethodType
Normalization method algorithm to use (LocalBrightness, LocalContrast).
A ResizeDescriptor for the ResizeLayer.
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
uint32_t m_MaxClassesPerDetection
Maximum numbers of classes per detection, used in Fast NMS.
std::vector< unsigned int > m_Axis
Values for the dimensions to reduce.
A StackDescriptor for the StackLayer.
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
constexpr char const * GetUnaryOperationAsCString(UnaryOperation operation)
Definition: TypesUtils.hpp:71
TensorShape m_TargetShape
Target shape value.
uint32_t m_PoolHeight
Pooling height value.
uint32_t m_PadTop
Padding top value in the height dimension.
uint32_t m_MaxDetections
Maximum numbers of detections.
A PadDescriptor for the PadLayer.
const uint32_t * GetViewOrigin(uint32_t idx) const
Return the view origin at the int value idx.
uint32_t m_StrideX
Stride value when proceeding through input for the width dimension.
uint32_t m_StrideX
Stride value when proceeding through input for the width dimension.
float m_NmsIouThreshold
Intersection over union threshold.
An LstmDescriptor for the LstmLayer.
uint32_t m_PadRight
Padding right value in the width dimension.
uint32_t m_DilationX
Dilation factor value for width dimension.
uint32_t m_PadTop
Padding top value in the height dimension.
int32_t m_NewAxisMask
New axis mask value.
bool m_KeepDims
Enable/disable keep dimensions. If true, then the reduced dimensions that are of length 1 are kept...
std::vector< unsigned int > m_BlockShape
Block shape values.
A L2NormalizationDescriptor for the L2NormalizationLayer.
An OriginsDescriptor for the ConcatLayer.
A ReduceDescriptor for the REDUCE operators.
A FullyConnectedDescriptor for the FullyConnectedLayer.
int32_t m_EllipsisMask
Ellipsis mask value.
bool m_BiasEnabled
Enable/disable bias.
A FakeQuantizationDescriptor for the FakeQuantizationLayer.
uint32_t m_TargetWidth
Target width value.
bool m_PeepholeEnabled
Enable/disable peephole.
uint32_t m_NumClasses
Number of classes.
bool m_HalfPixelCenters
Half Pixel Centers.
uint32_t m_PadTop
Padding top value in the height dimension.
bool m_UseRegularNms
Use Regular NMS.
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
std::vector< unsigned int > m_BlockShape
Block shape value.
std::vector< int > m_Stride
Stride values for the input that will be sliced.
constexpr const char * GetNormalizationAlgorithmMethodAsCString(NormalizationAlgorithmMethod method)
Definition: TypesUtils.hpp:236
An ActivationDescriptor for the ActivationLayer.
Definition: Descriptors.hpp:25
uint32_t m_TargetHeight
Target height value.
uint32_t m_NumInputs
Number of input tensors.
uint32_t m_TargetHeight
Target height value.
uint32_t m_ActivationFunc
The activation function to use.
uint32_t m_StrideY
Stride value when proceeding through input for the height dimension.
float m_ClippingThresCell
Clipping threshold value for the cell state.
unsigned int m_BlockSize
Scalar specifying the input block size. It must be >= 1.
constexpr const char * GetNormalizationAlgorithmChannelAsCString(NormalizationAlgorithmChannel channel)
Definition: TypesUtils.hpp:226
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
std::vector< uint32_t > m_vAxis
The indices of the dimensions to reduce.
float m_ScaleH
Center size encoding scale height.
ComparisonOperation m_Operation
Specifies the comparison operation to execute.
Definition: Descriptors.hpp:94
std::vector< int > m_End
End values for the input that will be sliced.
A SpaceToBatchNdDescriptor for the SpaceToBatchNdLayer.
NormalizationAlgorithmChannel m_NormChannelType
Normalization channel algorithm to use (Across, Within).
const uint32_t * GetViewSizes(uint32_t idx) const
Get the view sizes at the int value idx.
float m_A
Alpha upper bound value used by the activation functions. (BoundedReLu, Linear, TanH, Elu).
Definition: Descriptors.hpp:50
uint32_t m_DilationX
Dilation along x axis.
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
bool m_CifgEnabled
Enable/disable cifg (coupled input & forget gate).
uint32_t m_PadLeft
Padding left value in the width dimension.
bool m_AlignCorners
Aligned corners.
uint32_t m_StrideX
Stride value when proceeding through input for the width dimension.
A ElementwiseUnaryDescriptor for the ElementwiseUnaryLayer.
Definition: Descriptors.hpp:98
PoolingAlgorithm m_PoolType
The pooling algorithm to use (Max. Average, L2).
uint32_t m_StrideY
Stride value when proceeding through input for the height dimension.
uint32_t m_StrideY
Stride value when proceeding through input for the height dimension.
std::vector< std::pair< unsigned int, unsigned int > > m_Crops
The values to crop from the input dimension.
OutputShapeRounding m_OutputShapeRounding
The rounding method for the output shape. (Floor, Ceiling).
constexpr char const * GetComparisonOperationAsCString(ComparisonOperation operation)
Definition: TypesUtils.hpp:57
uint32_t GetNumDimensions() const
Get the number of dimensions.
A MeanDescriptor for the MeanLayer.
constexpr char const * GetActivationFunctionAsCString(ActivationFunction activation)
Definition: TypesUtils.hpp:27
bool m_LayerNormEnabled
Enable/disable layer normalization.
uint32_t m_PadRight
Padding right value in the width dimension.
A TransposeDescriptor for the TransposeLayer.
A StridedSliceDescriptor for the StridedSliceLayer.
constexpr char const * GetReduceOperationAsCString(ReduceOperation reduce_operation)
Definition: TypesUtils.hpp:128
float m_ScaleY
Center size encoding scale y.
uint32_t GetNumViews() const
Get the number of views.
float m_NmsScoreThreshold
NMS score threshold.
constexpr char const * GetPaddingMethodAsCString(PaddingMethod method)
Definition: TypesUtils.hpp:118
A PreCompiledDescriptor for the PreCompiledLayer.
A Pooling2dDescriptor for the Pooling2dLayer.
A NormalizationDescriptor for the NormalizationLayer.
std::function< void(const std::string &name, const std::string &value)> ParameterStringifyFunction
static void Serialize(ParameterStringifyFunction &, const LayerParameter &)
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
unsigned int GetConcatAxis() const
Get the concatenation axis value.
A ResizeBilinearDescriptor for the ResizeBilinearLayer.
float m_B
Beta lower bound value used by the activation functions. (BoundedReLu, Linear, TanH).
Definition: Descriptors.hpp:52
A SoftmaxDescriptor for the SoftmaxLayer.
float m_Beta
Beta value for the normalization equation.
const OriginsDescriptor & GetOrigins() const
Get the View Origins.
PermutationVector m_DimMappings
Indicates how to translate tensor elements from a given source into the target destination, when source and target potentially have different memory layouts e.g.
uint32_t m_NormSize
Depth radius value.
ActivationFunction m_Function
The activation function to use (Sigmoid, TanH, Linear, ReLu, BoundedReLu, SoftReLu, LeakyReLu, Abs, Sqrt, Square, Elu).
Definition: Descriptors.hpp:48
uint32_t m_StrideY
Stride value when proceeding through input for the height dimension.
A DepthwiseConvolution2dDescriptor for the DepthwiseConvolution2dLayer.
A BatchNormalizationDescriptor for the BatchNormalizationLayer.
uint32_t m_PadLeft
Padding left value in the width dimension.
A PermuteDescriptor for the PermuteLayer.
uint32_t m_PadRight
Padding right value in the width dimension.