ArmNN
 20.02
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 }
297 
299  const ResizeDescriptor& desc)
300 {
301  fn("TargetWidth", std::to_string(desc.m_TargetWidth));
302  fn("TargetHeight", std::to_string(desc.m_TargetHeight));
303  fn("ResizeMethod", GetResizeMethodAsCString(desc.m_Method));
304  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
305 }
306 
308  const SpaceToBatchNdDescriptor& desc)
309 {
310  {
311  std::stringstream ss;
312  int count = 0;
313  for (auto&& var : desc.m_BlockShape)
314  {
315  if (count > 0)
316  {
317  ss << ",";
318  }
319  ss << var;
320  ++count;
321  }
322  fn("BlockShape", ss.str());
323  }
324 
325  {
326  std::stringstream ss;
327  int count = 0;
328  for (auto&& var : desc.m_PadList)
329  {
330  if (count > 0)
331  {
332  ss << ",";
333  }
334  ss << "[" << var.first << "," << var.second << "]";
335  ++count;
336  }
337  fn("PadList", ss.str());
338  }
339 
340  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
341 }
342 
344  const SpaceToDepthDescriptor& desc)
345 {
346  fn("BlockSize", std::to_string(desc.m_BlockSize));
347  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
348 }
349 
351 {
352  fn("ActivationFunc", std::to_string(desc.m_ActivationFunc));
353  fn("ClippingThresCell", std::to_string(desc.m_ClippingThresCell));
354  fn("ClippingThresProj", std::to_string(desc.m_ClippingThresProj));
355  fn("CifgEnabled", (desc.m_CifgEnabled ? "true" : "false")) ;
356  fn("PeepholeEnabled", (desc.m_PeepholeEnabled ? "true" : "false")) ;
357  fn("ProjectionEnabled", (desc.m_ProjectionEnabled ? "true" : "false")) ;
358  fn("LayerNormEnabled", (desc.m_LayerNormEnabled ? "true" : "false"));
359 }
360 
362 {
363  {
364  std::stringstream ss;
365  int count = 0;
366  for (auto&& var : desc.m_Axis)
367  {
368  if (count > 0)
369  {
370  ss << ",";
371  }
372  ss << var;
373  ++count;
374  }
375  fn("Axis", ss.str());
376  }
377  fn("KeepDims", (desc.m_KeepDims ? "true" : "false"));
378 }
379 
381 {
382  {
383  std::stringstream ss;
384  int count = 0;
385  for (auto&& var : desc.m_PadList)
386  {
387  if (count > 0)
388  {
389  ss << ",";
390  }
391  ss << "[" << var.first << "," << var.second << "]";
392  ++count;
393  }
394  fn("PadList", ss.str());
395  }
396  fn("PadValue", std::to_string(desc.m_PadValue));
397 }
398 
400 {
401  fn("Axis", std::to_string(desc.m_Axis));
402  fn("NumInputs", std::to_string(desc.m_NumInputs));
403  {
404  std::stringstream ss;
405  ss << desc.m_InputShape;
406  fn("InputShape",ss.str());
407  }
408 }
409 
411  const StridedSliceDescriptor& desc)
412 {
413  {
414  std::stringstream ss;
415  int count = 0;
416  for (auto&& var : desc.m_Begin)
417  {
418  if (count > 0)
419  {
420  ss << ",";
421  }
422  ss << var;
423  ++count;
424  }
425  fn("Begin", ss.str());
426  }
427 
428  {
429  std::stringstream ss;
430  int count = 0;
431  for (auto&& var : desc.m_End)
432  {
433  if (count > 0)
434  {
435  ss << ",";
436  }
437  ss << var;
438  ++count;
439  }
440  fn("End", ss.str());
441  }
442 
443  {
444  std::stringstream ss;
445  int count = 0;
446  for (auto&& var : desc.m_Stride)
447  {
448  if (count > 0)
449  {
450  ss << ",";
451  }
452  ss << var;
453  ++count;
454  }
455  fn("Stride", ss.str());
456  }
457 
458  fn("BeginMask", std::to_string(desc.m_BeginMask));
459  fn("EndMask", std::to_string(desc.m_EndMask));
460  fn("ShrinkAxisMask", std::to_string(desc.m_ShrinkAxisMask));
461  fn("EllipsisMask", std::to_string(desc.m_EllipsisMask));
462  fn("NewAxisMask", std::to_string(desc.m_NewAxisMask));
463  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
464 }
465 
467  const PreCompiledDescriptor& desc)
468 {
469  fn("NumInputSlots", std::to_string(desc.m_NumInputSlots));
470  fn("NumOutputSlots", std::to_string(desc.m_NumOutputSlots));
471 }
472 
476 {
477  {
478  std::stringstream ss;
479  ss << "(" << desc.m_PadTop << "," << desc.m_PadLeft
480  << "," << desc.m_PadBottom << "," << desc.m_PadRight << ")";
481  fn("Padding(T,L,B,R)",ss.str());
482  }
483 
484  {
485  std::stringstream ss;
486  ss << "(" << desc.m_StrideX << "," << desc.m_StrideY << ")";
487  fn("Stride(X,Y)", ss.str());
488  }
489 
490  fn("BiasEnabled", (desc.m_BiasEnabled ? "true" : "false"));
491  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
492 }
493 
495  const TransposeDescriptor& desc)
496 {
497  std::stringstream ss;
498  ss << "[";
499  bool addComma = false;
500  for (auto it : desc.m_DimMappings)
501  {
502  if (addComma)
503  {
504  ss << ",";
505  }
506  ss << it;
507  addComma = true;
508  }
509  ss << "]";
510 
511  fn("DimMappings",ss.str());
512 }
513 
514 } // 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_ProjectionEnabled
Enable/disable the projection layer.
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
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:190
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:220
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:84
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:95
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.
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:210
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:200
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).
Definition: Descriptors.hpp:37
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.
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:105
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:39
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).
Definition: Descriptors.hpp:35
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.