ArmNN
 21.05
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 PermuteDescriptor& desc)
16 {
17  std::stringstream ss;
18  ss << "[";
19  bool addComma = false;
20  for (auto it : desc.m_DimMappings)
21  {
22  if (addComma)
23  {
24  ss << ",";
25  }
26  ss << it;
27  addComma = true;
28  }
29  ss << "]";
30 
31  fn("DimMappings",ss.str());
32 }
33 
35  const ReshapeDescriptor& desc)
36 {
37  std::stringstream ss;
38  ss << desc.m_TargetShape;
39  fn("TargetShape",ss.str());
40 }
41 
43  const ActivationDescriptor& desc)
44 {
45  fn("Function", GetActivationFunctionAsCString(desc.m_Function));
46  fn("A", std::to_string(desc.m_A));
47  fn("B", std::to_string(desc.m_B));
48 }
49 
51  const Convolution2dDescriptor& desc)
52 {
53  {
54  std::stringstream ss;
55  ss << "(" << desc.m_PadTop << "," << desc.m_PadLeft
56  << "," << desc.m_PadBottom << "," << desc.m_PadRight << ")";
57  fn("Padding(T,L,B,R)",ss.str());
58  }
59 
60  {
61  std::stringstream ss;
62  ss << "(" << desc.m_StrideX << "," << desc.m_StrideY << ")";
63  fn("Stride(X,Y)", ss.str());
64  }
65 
66  {
67  std::stringstream ss;
68  ss << "(" << desc.m_DilationX << "," << desc.m_DilationY << ")";
69  fn("Dilation(X,Y)", ss.str());
70  }
71 
72  fn("BiasEnabled",(desc.m_BiasEnabled ? "true" : "false"));
73  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
74 }
75 
77  const BatchNormalizationDescriptor& desc)
78 {
79  fn("Eps", std::to_string(desc.m_Eps));
80  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
81 }
82 
86 {
87  {
88  std::stringstream ss;
89  ss << "(" << desc.m_PadTop << "," << desc.m_PadLeft
90  << "," << desc.m_PadBottom << "," << desc.m_PadRight << ")";
91  fn("Padding(T,L,B,R)",ss.str());
92  }
93 
94  {
95  std::stringstream ss;
96  ss << "(" << desc.m_StrideX << "," << desc.m_StrideY << ")";
97  fn("Stride(X,Y)", ss.str());
98  }
99 
100  {
101  std::stringstream ss;
102  ss << "(" << desc.m_DilationX << "," << desc.m_DilationY << ")";
103  fn("Dilation(X,Y)", ss.str());
104  }
105 
106  fn("BiasEnabled",(desc.m_BiasEnabled ? "true" : "false"));
107  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
108 }
109 
111  const Pooling2dDescriptor& desc)
112 {
113  fn("Type", GetPoolingAlgorithmAsCString(desc.m_PoolType));
114  {
115  std::stringstream ss;
116  ss << "(" << desc.m_PadTop << "," << desc.m_PadLeft
117  << "," << desc.m_PadBottom << "," << desc.m_PadRight << ")";
118  fn("Padding(T,L,B,R)", ss.str());
119  }
120 
121  {
122  std::stringstream ss;
123  ss << "(" << desc.m_PoolWidth << "," << desc.m_PoolHeight << ")";
124  fn("(Width,Height)", ss.str());
125  }
126 
127  {
128  std::stringstream ss;
129  ss << "(" << desc.m_StrideX << "," << desc.m_StrideY << ")";
130  fn("Stride(X,Y)", ss.str());
131  }
132 
133  fn("OutputShapeRounding", GetOutputShapeRoundingAsCString(desc.m_OutputShapeRounding));
134  fn("PaddingMethod", GetPaddingMethodAsCString(desc.m_PaddingMethod));
135  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
136 }
137 
139 {
140  {
141  std::stringstream ss;
142  int count = 0;
143  for (auto&& var : desc.m_vAxis)
144  {
145  if (count > 0)
146  {
147  ss << ",";
148  }
149  ss << var;
150  ++count;
151  }
152  fn("Axis", ss.str());
153  }
154  fn("KeepDims", (desc.m_KeepDims ? "true" : "false"));
155  fn("ReduceOperation", GetReduceOperationAsCString(desc.m_ReduceOperation));
156 }
157 
159  const SoftmaxDescriptor& desc)
160 {
161  fn("Beta", std::to_string(desc.m_Beta));
162  fn("Axis", std::to_string(desc.m_Axis));
163 }
164 
166  const FullyConnectedDescriptor& desc)
167 {
168  fn("BiasEnabled", (desc.m_BiasEnabled ? "true" : "false"));
169  fn("TransposeWeightMatrix", (desc.m_TransposeWeightMatrix ? "true" : "false"));
170 }
171 
173  const OriginsDescriptor& desc)
174 {
175  fn("ConcatAxis", std::to_string(desc.GetConcatAxis()));
176 
177  uint32_t numViews = desc.GetNumViews();
178  uint32_t numDims = desc.GetNumDimensions();
179 
180  for (uint32_t view = 0; view < numViews; ++view)
181  {
182  std::stringstream key;
183  key << "MergeTo#" << view;
184  std::stringstream value;
185  value << "[";
186  auto viewData = desc.GetViewOrigin(view);
187 
188  for (uint32_t dim = 0; dim < numDims; ++dim)
189  {
190  if (dim > 0)
191  {
192  value << ",";
193  }
194  value << viewData[dim];
195  }
196  value << "]";
197  fn(key.str(), value.str());
198  }
199 }
200 
202 {
203  uint32_t numViews = desc.GetNumViews();
204  uint32_t numDims = desc.GetNumDimensions();
205  for (uint32_t view = 0; view < numViews; ++view) {
206  std::stringstream key;
207  key << "ViewSizes#" << view;
208  std::stringstream value;
209  value << "[";
210  auto viewData = desc.GetViewSizes(view);
211  for (uint32_t dim = 0; dim < numDims; ++dim)
212  {
213  if (dim > 0)
214  {
215  value << ",";
216  }
217  value << viewData[dim];
218  }
219  value << "]";
220  fn(key.str(), value.str());
221  }
223 }
224 
226  const DetectionPostProcessDescriptor& desc)
227 {
228  fn("MaxDetections", std::to_string(desc.m_MaxDetections));
229  fn("MaxClassesPerDetection", std::to_string(desc.m_MaxClassesPerDetection));
230  fn("DetectionsPerClass", std::to_string(desc.m_DetectionsPerClass));
231  fn("NmsScoreThreshold", std::to_string(desc.m_NmsScoreThreshold));
232  fn("NmsIouThreshold", std::to_string(desc.m_NmsIouThreshold));
233  fn("NumClasses", std::to_string(desc.m_NumClasses));
234  fn("UseRegularNms", (desc.m_UseRegularNms ? "true" : "false"));
235  {
236  std::stringstream ss;
237  ss << "(" << desc.m_ScaleX << "," << desc.m_ScaleY << ")";
238  fn("Scale(X,Y)", ss.str());
239  }
240 
241  {
242  std::stringstream ss;
243  ss << "(" << desc.m_ScaleW << "," << desc.m_ScaleH << ")";
244  fn("Scale(W,H)", ss.str());
245  }
246 }
247 
249  const NormalizationDescriptor& desc)
250 {
253  fn("NormSize", std::to_string(desc.m_NormSize));
254  fn("Alpha", std::to_string(desc.m_Alpha));
255  fn("Beta", std::to_string(desc.m_Beta));
256  fn("K", std::to_string(desc.m_K));
257  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
258 }
259 
261  const L2NormalizationDescriptor& desc)
262 {
263  fn("Eps", std::to_string(desc.m_Eps));
264  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
265 }
266 
268  const BatchToSpaceNdDescriptor& desc)
269 {
270  {
271  std::stringstream ss;
272  int count = 0;
273  for (auto&& var : desc.m_BlockShape)
274  {
275  if (count > 0)
276  {
277  ss << ",";
278  }
279  ss << var;
280  ++count;
281  }
282  fn("BlockShape", ss.str());
283  }
284 
285  {
286  std::stringstream ss;
287  int count = 0;
288  for (auto&& var : desc.m_Crops)
289  {
290  if (count > 0)
291  {
292  ss << ",";
293  }
294  ss << "[" << var.first << "," << var.second << "]";
295  ++count;
296  }
297  fn("Crops", ss.str());
298  }
299 
300  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
301 }
302 
304  const FakeQuantizationDescriptor& desc)
305 {
306  fn("Min", std::to_string(desc.m_Min));
307  fn("Max", std::to_string(desc.m_Max));
308 }
309 
311  const ResizeBilinearDescriptor& desc)
312 {
313  fn("TargetWidth", std::to_string(desc.m_TargetWidth));
314  fn("TargetHeight", std::to_string(desc.m_TargetHeight));
315  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
316  fn("AlignCorners", std::to_string(desc.m_AlignCorners));
317  fn("HalfPixelCenters", std::to_string(desc.m_HalfPixelCenters));
318 }
319 
321  const ResizeDescriptor& desc)
322 {
323  fn("TargetWidth", std::to_string(desc.m_TargetWidth));
324  fn("TargetHeight", std::to_string(desc.m_TargetHeight));
325  fn("ResizeMethod", GetResizeMethodAsCString(desc.m_Method));
326  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
327  fn("AlignCorners", std::to_string(desc.m_AlignCorners));
328  fn("HalfPixelCenters", std::to_string(desc.m_HalfPixelCenters));
329 }
330 
332  const SpaceToBatchNdDescriptor& desc)
333 {
334  {
335  std::stringstream ss;
336  int count = 0;
337  for (auto&& var : desc.m_BlockShape)
338  {
339  if (count > 0)
340  {
341  ss << ",";
342  }
343  ss << var;
344  ++count;
345  }
346  fn("BlockShape", ss.str());
347  }
348 
349  {
350  std::stringstream ss;
351  int count = 0;
352  for (auto&& var : desc.m_PadList)
353  {
354  if (count > 0)
355  {
356  ss << ",";
357  }
358  ss << "[" << var.first << "," << var.second << "]";
359  ++count;
360  }
361  fn("PadList", ss.str());
362  }
363 
364  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
365 }
366 
368  const SpaceToDepthDescriptor& desc)
369 {
370  fn("BlockSize", std::to_string(desc.m_BlockSize));
371  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
372 }
373 
375 {
376  fn("ActivationFunc", std::to_string(desc.m_ActivationFunc));
377  fn("ClippingThresCell", std::to_string(desc.m_ClippingThresCell));
378  fn("ClippingThresProj", std::to_string(desc.m_ClippingThresProj));
379  fn("CifgEnabled", (desc.m_CifgEnabled ? "true" : "false")) ;
380  fn("PeepholeEnabled", (desc.m_PeepholeEnabled ? "true" : "false")) ;
381  fn("ProjectionEnabled", (desc.m_ProjectionEnabled ? "true" : "false")) ;
382  fn("LayerNormEnabled", (desc.m_LayerNormEnabled ? "true" : "false"));
383 }
384 
386 {
387  {
388  std::stringstream ss;
389  int count = 0;
390  for (auto&& var : desc.m_Axis)
391  {
392  if (count > 0)
393  {
394  ss << ",";
395  }
396  ss << var;
397  ++count;
398  }
399  fn("Axis", ss.str());
400  }
401  fn("KeepDims", (desc.m_KeepDims ? "true" : "false"));
402 }
403 
405 {
406  {
407  std::stringstream ss;
408  int count = 0;
409  for (auto&& var : desc.m_PadList)
410  {
411  if (count > 0)
412  {
413  ss << ",";
414  }
415  ss << "[" << var.first << "," << var.second << "]";
416  ++count;
417  }
418  fn("PadList", ss.str());
419  }
420  fn("PadValue", std::to_string(desc.m_PadValue));
421 }
422 
424 {
425  fn("Axis", std::to_string(desc.m_Axis));
426  fn("NumInputs", std::to_string(desc.m_NumInputs));
427  {
428  std::stringstream ss;
429  ss << desc.m_InputShape;
430  fn("InputShape",ss.str());
431  }
432 }
433 
435  const StridedSliceDescriptor& desc)
436 {
437  {
438  std::stringstream ss;
439  int count = 0;
440  for (auto&& var : desc.m_Begin)
441  {
442  if (count > 0)
443  {
444  ss << ",";
445  }
446  ss << var;
447  ++count;
448  }
449  fn("Begin", ss.str());
450  }
451 
452  {
453  std::stringstream ss;
454  int count = 0;
455  for (auto&& var : desc.m_End)
456  {
457  if (count > 0)
458  {
459  ss << ",";
460  }
461  ss << var;
462  ++count;
463  }
464  fn("End", ss.str());
465  }
466 
467  {
468  std::stringstream ss;
469  int count = 0;
470  for (auto&& var : desc.m_Stride)
471  {
472  if (count > 0)
473  {
474  ss << ",";
475  }
476  ss << var;
477  ++count;
478  }
479  fn("Stride", ss.str());
480  }
481 
482  fn("BeginMask", std::to_string(desc.m_BeginMask));
483  fn("EndMask", std::to_string(desc.m_EndMask));
484  fn("ShrinkAxisMask", std::to_string(desc.m_ShrinkAxisMask));
485  fn("EllipsisMask", std::to_string(desc.m_EllipsisMask));
486  fn("NewAxisMask", std::to_string(desc.m_NewAxisMask));
487  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
488 }
489 
491  const PreCompiledDescriptor& desc)
492 {
493  fn("NumInputSlots", std::to_string(desc.m_NumInputSlots));
494  fn("NumOutputSlots", std::to_string(desc.m_NumOutputSlots));
495 }
496 
500 {
501  {
502  std::stringstream ss;
503  ss << "(" << desc.m_PadTop << "," << desc.m_PadLeft
504  << "," << desc.m_PadBottom << "," << desc.m_PadRight << ")";
505  fn("Padding(T,L,B,R)",ss.str());
506  }
507 
508  {
509  std::stringstream ss;
510  ss << "(" << desc.m_StrideX << "," << desc.m_StrideY << ")";
511  fn("Stride(X,Y)", ss.str());
512  }
513 
514  fn("BiasEnabled", (desc.m_BiasEnabled ? "true" : "false"));
515  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
516 }
517 
519  const TransposeDescriptor& desc)
520 {
521  std::stringstream ss;
522  ss << "[";
523  bool addComma = false;
524  for (auto it : desc.m_DimMappings)
525  {
526  if (addComma)
527  {
528  ss << ",";
529  }
530  ss << it;
531  addComma = true;
532  }
533  ss << "]";
534 
535  fn("DimMappings",ss.str());
536 }
537 
538 } // 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.
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:214
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:244
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.
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:95
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:106
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).
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:234
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:224
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.
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.
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).
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:126
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:116
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.