19 bool addComma =
false;
31 fn(
"DimMappings",ss.str());
39 fn(
"TargetShape",ss.str());
46 fn(
"A", std::to_string(desc.
m_A));
47 fn(
"B", std::to_string(desc.
m_B));
57 fn(
"Padding(T,L,B,R)",ss.str());
63 fn(
"Stride(X,Y)", ss.str());
69 fn(
"Dilation(X,Y)", ss.str());
79 fn(
"Eps", std::to_string(desc.
m_Eps));
91 fn(
"Padding(T,L,B,R)",ss.str());
97 fn(
"Stride(X,Y)", ss.str());
101 std::stringstream ss;
103 fn(
"Dilation(X,Y)", ss.str());
115 std::stringstream ss;
118 fn(
"Padding(T,L,B,R)", ss.str());
122 std::stringstream ss;
124 fn(
"(Width,Height)", ss.str());
128 std::stringstream ss;
130 fn(
"Stride(X,Y)", ss.str());
141 fn(
"Beta", std::to_string(desc.
m_Beta));
142 fn(
"Axis", std::to_string(desc.
m_Axis));
160 for (uint32_t view = 0; view < numViews; ++view)
162 std::stringstream key;
163 key <<
"MergeTo#" << view;
164 std::stringstream value;
168 for (uint32_t dim = 0; dim < numDims; ++dim)
174 value << viewData[dim];
177 fn(key.str(), value.str());
185 for (uint32_t view = 0; view < numViews; ++view) {
186 std::stringstream key;
187 key <<
"ViewSizes#" << view;
188 std::stringstream value;
191 for (uint32_t dim = 0; dim < numDims; ++dim)
197 value << viewData[dim];
200 fn(key.str(), value.str());
216 std::stringstream ss;
218 fn(
"Scale(X,Y)", ss.str());
222 std::stringstream ss;
224 fn(
"Scale(W,H)", ss.str());
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));
243 fn(
"Eps", std::to_string(desc.
m_Eps));
251 std::stringstream ss;
262 fn(
"BlockShape", ss.str());
266 std::stringstream ss;
268 for (
auto&& var : desc.
m_Crops)
274 ss <<
"[" << var.first <<
"," << var.second <<
"]";
277 fn(
"Crops", ss.str());
286 fn(
"Min", std::to_string(desc.
m_Min));
287 fn(
"Max", std::to_string(desc.
m_Max));
311 std::stringstream ss;
322 fn(
"BlockShape", ss.str());
326 std::stringstream ss;
334 ss <<
"[" << var.first <<
"," << var.second <<
"]";
337 fn(
"PadList", ss.str());
364 std::stringstream ss;
366 for (
auto&& var : desc.
m_Axis)
375 fn(
"Axis", ss.str());
377 fn(
"KeepDims", (desc.
m_KeepDims ?
"true" :
"false"));
383 std::stringstream ss;
391 ss <<
"[" << var.first <<
"," << var.second <<
"]";
394 fn(
"PadList", ss.str());
396 fn(
"PadValue", std::to_string(desc.
m_PadValue));
401 fn(
"Axis", std::to_string(desc.
m_Axis));
404 std::stringstream ss;
406 fn(
"InputShape",ss.str());
414 std::stringstream ss;
416 for (
auto&& var : desc.
m_Begin)
425 fn(
"Begin", ss.str());
429 std::stringstream ss;
431 for (
auto&& var : desc.
m_End)
444 std::stringstream ss;
455 fn(
"Stride", ss.str());
459 fn(
"EndMask", std::to_string(desc.
m_EndMask));
478 std::stringstream ss;
481 fn(
"Padding(T,L,B,R)",ss.str());
485 std::stringstream ss;
487 fn(
"Stride(X,Y)", ss.str());
497 std::stringstream ss;
499 bool addComma =
false;
511 fn(
"DimMappings",ss.str());
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)
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)
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).
float m_Min
Minimum value.
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)
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)
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.
unsigned int m_NumInputSlots
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)
An ActivationDescriptor for the ActivationLayer.
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)
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).
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)
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)
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.
unsigned int m_NumOutputSlots
A ResizeBilinearDescriptor for the ResizeBilinearLayer.
float m_B
Beta lower bound value used by the activation functions. (BoundedReLu, Linear, TanH).
A SoftmaxDescriptor for the SoftmaxLayer.
float m_Beta
Beta value for the normalization equation.
float m_Max
Maximum value.
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).
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.