ArmNN
 20.11
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  const SoftmaxDescriptor& desc)
140 {
141  fn("Beta", std::to_string(desc.m_Beta));
142  fn("Axis", std::to_string(desc.m_Axis));
143 }
144 
146  const FullyConnectedDescriptor& desc)
147 {
148  fn("BiasEnabled", (desc.m_BiasEnabled ? "true" : "false"));
149  fn("TransposeWeightMatrix", (desc.m_TransposeWeightMatrix ? "true" : "false"));
150 }
151 
153  const OriginsDescriptor& desc)
154 {
155  fn("ConcatAxis", std::to_string(desc.GetConcatAxis()));
156 
157  uint32_t numViews = desc.GetNumViews();
158  uint32_t numDims = desc.GetNumDimensions();
159 
160  for (uint32_t view = 0; view < numViews; ++view)
161  {
162  std::stringstream key;
163  key << "MergeTo#" << view;
164  std::stringstream value;
165  value << "[";
166  auto viewData = desc.GetViewOrigin(view);
167 
168  for (uint32_t dim = 0; dim < numDims; ++dim)
169  {
170  if (dim > 0)
171  {
172  value << ",";
173  }
174  value << viewData[dim];
175  }
176  value << "]";
177  fn(key.str(), value.str());
178  }
179 }
180 
182 {
183  uint32_t numViews = desc.GetNumViews();
184  uint32_t numDims = desc.GetNumDimensions();
185  for (uint32_t view = 0; view < numViews; ++view) {
186  std::stringstream key;
187  key << "ViewSizes#" << view;
188  std::stringstream value;
189  value << "[";
190  auto viewData = desc.GetViewSizes(view);
191  for (uint32_t dim = 0; dim < numDims; ++dim)
192  {
193  if (dim > 0)
194  {
195  value << ",";
196  }
197  value << viewData[dim];
198  }
199  value << "]";
200  fn(key.str(), value.str());
201  }
203 }
204 
206  const DetectionPostProcessDescriptor& desc)
207 {
208  fn("MaxDetections", std::to_string(desc.m_MaxDetections));
209  fn("MaxClassesPerDetection", std::to_string(desc.m_MaxClassesPerDetection));
210  fn("DetectionsPerClass", std::to_string(desc.m_DetectionsPerClass));
211  fn("NmsScoreThreshold", std::to_string(desc.m_NmsScoreThreshold));
212  fn("NmsIouThreshold", std::to_string(desc.m_NmsIouThreshold));
213  fn("NumClasses", std::to_string(desc.m_NumClasses));
214  fn("UseRegularNms", (desc.m_UseRegularNms ? "true" : "false"));
215  {
216  std::stringstream ss;
217  ss << "(" << desc.m_ScaleX << "," << desc.m_ScaleY << ")";
218  fn("Scale(X,Y)", ss.str());
219  }
220 
221  {
222  std::stringstream ss;
223  ss << "(" << desc.m_ScaleW << "," << desc.m_ScaleH << ")";
224  fn("Scale(W,H)", ss.str());
225  }
226 }
227 
229  const NormalizationDescriptor& desc)
230 {
233  fn("NormSize", std::to_string(desc.m_NormSize));
234  fn("Alpha", std::to_string(desc.m_Alpha));
235  fn("Beta", std::to_string(desc.m_Beta));
236  fn("K", std::to_string(desc.m_K));
237  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
238 }
239 
241  const L2NormalizationDescriptor& desc)
242 {
243  fn("Eps", std::to_string(desc.m_Eps));
244  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
245 }
246 
248  const BatchToSpaceNdDescriptor& desc)
249 {
250  {
251  std::stringstream ss;
252  int count = 0;
253  for (auto&& var : desc.m_BlockShape)
254  {
255  if (count > 0)
256  {
257  ss << ",";
258  }
259  ss << var;
260  ++count;
261  }
262  fn("BlockShape", ss.str());
263  }
264 
265  {
266  std::stringstream ss;
267  int count = 0;
268  for (auto&& var : desc.m_Crops)
269  {
270  if (count > 0)
271  {
272  ss << ",";
273  }
274  ss << "[" << var.first << "," << var.second << "]";
275  ++count;
276  }
277  fn("Crops", ss.str());
278  }
279 
280  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
281 }
282 
284  const FakeQuantizationDescriptor& desc)
285 {
286  fn("Min", std::to_string(desc.m_Min));
287  fn("Max", std::to_string(desc.m_Max));
288 }
289 
291  const ResizeBilinearDescriptor& desc)
292 {
293  fn("TargetWidth", std::to_string(desc.m_TargetWidth));
294  fn("TargetHeight", std::to_string(desc.m_TargetHeight));
295  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
296  fn("AlignCorners", std::to_string(desc.m_AlignCorners));
297  fn("HalfPixelCenters", std::to_string(desc.m_HalfPixelCenters));
298 }
299 
301  const ResizeDescriptor& desc)
302 {
303  fn("TargetWidth", std::to_string(desc.m_TargetWidth));
304  fn("TargetHeight", std::to_string(desc.m_TargetHeight));
305  fn("ResizeMethod", GetResizeMethodAsCString(desc.m_Method));
306  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
307  fn("AlignCorners", std::to_string(desc.m_AlignCorners));
308  fn("HalfPixelCenters", std::to_string(desc.m_HalfPixelCenters));
309 }
310 
312  const SpaceToBatchNdDescriptor& desc)
313 {
314  {
315  std::stringstream ss;
316  int count = 0;
317  for (auto&& var : desc.m_BlockShape)
318  {
319  if (count > 0)
320  {
321  ss << ",";
322  }
323  ss << var;
324  ++count;
325  }
326  fn("BlockShape", ss.str());
327  }
328 
329  {
330  std::stringstream ss;
331  int count = 0;
332  for (auto&& var : desc.m_PadList)
333  {
334  if (count > 0)
335  {
336  ss << ",";
337  }
338  ss << "[" << var.first << "," << var.second << "]";
339  ++count;
340  }
341  fn("PadList", ss.str());
342  }
343 
344  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
345 }
346 
348  const SpaceToDepthDescriptor& desc)
349 {
350  fn("BlockSize", std::to_string(desc.m_BlockSize));
351  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
352 }
353 
355 {
356  fn("ActivationFunc", std::to_string(desc.m_ActivationFunc));
357  fn("ClippingThresCell", std::to_string(desc.m_ClippingThresCell));
358  fn("ClippingThresProj", std::to_string(desc.m_ClippingThresProj));
359  fn("CifgEnabled", (desc.m_CifgEnabled ? "true" : "false")) ;
360  fn("PeepholeEnabled", (desc.m_PeepholeEnabled ? "true" : "false")) ;
361  fn("ProjectionEnabled", (desc.m_ProjectionEnabled ? "true" : "false")) ;
362  fn("LayerNormEnabled", (desc.m_LayerNormEnabled ? "true" : "false"));
363 }
364 
366 {
367  {
368  std::stringstream ss;
369  int count = 0;
370  for (auto&& var : desc.m_Axis)
371  {
372  if (count > 0)
373  {
374  ss << ",";
375  }
376  ss << var;
377  ++count;
378  }
379  fn("Axis", ss.str());
380  }
381  fn("KeepDims", (desc.m_KeepDims ? "true" : "false"));
382 }
383 
385 {
386  {
387  std::stringstream ss;
388  int count = 0;
389  for (auto&& var : desc.m_PadList)
390  {
391  if (count > 0)
392  {
393  ss << ",";
394  }
395  ss << "[" << var.first << "," << var.second << "]";
396  ++count;
397  }
398  fn("PadList", ss.str());
399  }
400  fn("PadValue", std::to_string(desc.m_PadValue));
401 }
402 
404 {
405  fn("Axis", std::to_string(desc.m_Axis));
406  fn("NumInputs", std::to_string(desc.m_NumInputs));
407  {
408  std::stringstream ss;
409  ss << desc.m_InputShape;
410  fn("InputShape",ss.str());
411  }
412 }
413 
415  const StridedSliceDescriptor& desc)
416 {
417  {
418  std::stringstream ss;
419  int count = 0;
420  for (auto&& var : desc.m_Begin)
421  {
422  if (count > 0)
423  {
424  ss << ",";
425  }
426  ss << var;
427  ++count;
428  }
429  fn("Begin", ss.str());
430  }
431 
432  {
433  std::stringstream ss;
434  int count = 0;
435  for (auto&& var : desc.m_End)
436  {
437  if (count > 0)
438  {
439  ss << ",";
440  }
441  ss << var;
442  ++count;
443  }
444  fn("End", ss.str());
445  }
446 
447  {
448  std::stringstream ss;
449  int count = 0;
450  for (auto&& var : desc.m_Stride)
451  {
452  if (count > 0)
453  {
454  ss << ",";
455  }
456  ss << var;
457  ++count;
458  }
459  fn("Stride", ss.str());
460  }
461 
462  fn("BeginMask", std::to_string(desc.m_BeginMask));
463  fn("EndMask", std::to_string(desc.m_EndMask));
464  fn("ShrinkAxisMask", std::to_string(desc.m_ShrinkAxisMask));
465  fn("EllipsisMask", std::to_string(desc.m_EllipsisMask));
466  fn("NewAxisMask", std::to_string(desc.m_NewAxisMask));
467  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
468 }
469 
471  const PreCompiledDescriptor& desc)
472 {
473  fn("NumInputSlots", std::to_string(desc.m_NumInputSlots));
474  fn("NumOutputSlots", std::to_string(desc.m_NumOutputSlots));
475 }
476 
480 {
481  {
482  std::stringstream ss;
483  ss << "(" << desc.m_PadTop << "," << desc.m_PadLeft
484  << "," << desc.m_PadBottom << "," << desc.m_PadRight << ")";
485  fn("Padding(T,L,B,R)",ss.str());
486  }
487 
488  {
489  std::stringstream ss;
490  ss << "(" << desc.m_StrideX << "," << desc.m_StrideY << ")";
491  fn("Stride(X,Y)", ss.str());
492  }
493 
494  fn("BiasEnabled", (desc.m_BiasEnabled ? "true" : "false"));
495  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
496 }
497 
499  const TransposeDescriptor& desc)
500 {
501  std::stringstream ss;
502  ss << "[";
503  bool addComma = false;
504  for (auto it : desc.m_DimMappings)
505  {
506  if (addComma)
507  {
508  ss << ",";
509  }
510  ss << it;
511  addComma = true;
512  }
513  ss << "]";
514 
515  fn("DimMappings",ss.str());
516 }
517 
518 } // 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:203
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:233
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_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.
Copyright (c) 2020 ARM Limited.
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 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:223
An ActivationDescriptor for the ActivationLayer.
Definition: Descriptors.hpp:20
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:213
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
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:45
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.
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:47
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:43
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.