ArmNN
NotReleased
|
#include <Serializer.hpp>
Public Member Functions | |
SerializerVisitor () | |
~SerializerVisitor () | |
flatbuffers::FlatBufferBuilder & | GetFlatBufferBuilder () |
std::vector< int > & | GetInputIds () |
std::vector< int > & | GetOutputIds () |
std::vector< flatbuffers::Offset< armnnSerializer::AnyLayer > > & | GetSerializedLayers () |
flatbuffers::Offset< armnnSerializer::FeatureCompatibilityVersions > | GetVersionTable () |
void | VisitAbsLayer (const armnn::IConnectableLayer *layer, const char *name=nullptr) override |
void | VisitActivationLayer (const armnn::IConnectableLayer *layer, const armnn::ActivationDescriptor &descriptor, const char *name=nullptr) override |
void | VisitAdditionLayer (const armnn::IConnectableLayer *layer, const char *name=nullptr) override |
void | VisitArgMinMaxLayer (const armnn::IConnectableLayer *layer, const armnn::ArgMinMaxDescriptor &argMinMaxDescriptor, const char *name=nullptr) override |
void | VisitBatchToSpaceNdLayer (const armnn::IConnectableLayer *layer, const armnn::BatchToSpaceNdDescriptor &descriptor, const char *name=nullptr) override |
void | VisitBatchNormalizationLayer (const armnn::IConnectableLayer *layer, const armnn::BatchNormalizationDescriptor &BatchNormalizationDescriptor, const armnn::ConstTensor &mean, const armnn::ConstTensor &variance, const armnn::ConstTensor &beta, const armnn::ConstTensor &gamma, const char *name=nullptr) override |
void | VisitComparisonLayer (const armnn::IConnectableLayer *layer, const armnn::ComparisonDescriptor &descriptor, const char *name=nullptr) override |
void | VisitConcatLayer (const armnn::IConnectableLayer *layer, const armnn::ConcatDescriptor &concatDescriptor, const char *name=nullptr) override |
void | VisitConstantLayer (const armnn::IConnectableLayer *layer, const armnn::ConstTensor &input, const char *=nullptr) override |
void | VisitConvolution2dLayer (const armnn::IConnectableLayer *layer, const armnn::Convolution2dDescriptor &descriptor, const armnn::ConstTensor &weights, const armnn::Optional< armnn::ConstTensor > &biases, const char *=nullptr) override |
void | VisitDepthToSpaceLayer (const armnn::IConnectableLayer *layer, const armnn::DepthToSpaceDescriptor &descriptor, const char *name=nullptr) override |
void | VisitDepthwiseConvolution2dLayer (const armnn::IConnectableLayer *layer, const armnn::DepthwiseConvolution2dDescriptor &descriptor, const armnn::ConstTensor &weights, const armnn::Optional< armnn::ConstTensor > &biases, const char *name=nullptr) override |
void | VisitDequantizeLayer (const armnn::IConnectableLayer *layer, const char *name=nullptr) override |
void | VisitDetectionPostProcessLayer (const armnn::IConnectableLayer *layer, const armnn::DetectionPostProcessDescriptor &descriptor, const armnn::ConstTensor &anchors, const char *name=nullptr) override |
void | VisitDivisionLayer (const armnn::IConnectableLayer *layer, const char *name=nullptr) override |
void | VisitElementwiseUnaryLayer (const armnn::IConnectableLayer *layer, const armnn::ElementwiseUnaryDescriptor &descriptor, const char *name=nullptr) override |
void | VisitEqualLayer (const armnn::IConnectableLayer *layer, const char *name=nullptr) override |
void | VisitFloorLayer (const armnn::IConnectableLayer *layer, const char *name=nullptr) override |
void | VisitFullyConnectedLayer (const armnn::IConnectableLayer *layer, const armnn::FullyConnectedDescriptor &fullyConnectedDescriptor, const armnn::ConstTensor &weights, const armnn::Optional< armnn::ConstTensor > &biases, const char *name=nullptr) override |
void | VisitGatherLayer (const armnn::IConnectableLayer *layer, const char *name=nullptr) override |
void | VisitGreaterLayer (const armnn::IConnectableLayer *layer, const char *name=nullptr) override |
void | VisitInputLayer (const armnn::IConnectableLayer *layer, armnn::LayerBindingId id, const char *name=nullptr) override |
void | VisitInstanceNormalizationLayer (const armnn::IConnectableLayer *layer, const armnn::InstanceNormalizationDescriptor &instanceNormalizationDescriptor, const char *name=nullptr) override |
void | VisitL2NormalizationLayer (const armnn::IConnectableLayer *layer, const armnn::L2NormalizationDescriptor &l2NormalizationDescriptor, const char *name=nullptr) override |
void | VisitLogSoftmaxLayer (const armnn::IConnectableLayer *layer, const armnn::LogSoftmaxDescriptor &logSoftmaxDescriptor, const char *name=nullptr) override |
void | VisitLstmLayer (const armnn::IConnectableLayer *layer, const armnn::LstmDescriptor &descriptor, const armnn::LstmInputParams ¶ms, const char *name=nullptr) override |
void | VisitMeanLayer (const armnn::IConnectableLayer *layer, const armnn::MeanDescriptor &descriptor, const char *name) override |
void | VisitMinimumLayer (const armnn::IConnectableLayer *layer, const char *name=nullptr) override |
void | VisitMaximumLayer (const armnn::IConnectableLayer *layer, const char *name=nullptr) override |
void | VisitMergeLayer (const armnn::IConnectableLayer *layer, const char *name=nullptr) override |
void | VisitMergerLayer (const armnn::IConnectableLayer *layer, const armnn::MergerDescriptor &mergerDescriptor, const char *name=nullptr) override |
void | VisitMultiplicationLayer (const armnn::IConnectableLayer *layer, const char *name=nullptr) override |
void | VisitOutputLayer (const armnn::IConnectableLayer *layer, armnn::LayerBindingId id, const char *name=nullptr) override |
void | VisitPadLayer (const armnn::IConnectableLayer *layer, const armnn::PadDescriptor &PadDescriptor, const char *name=nullptr) override |
void | VisitPermuteLayer (const armnn::IConnectableLayer *layer, const armnn::PermuteDescriptor &PermuteDescriptor, const char *name=nullptr) override |
void | VisitPooling2dLayer (const armnn::IConnectableLayer *layer, const armnn::Pooling2dDescriptor &pooling2dDescriptor, const char *name=nullptr) override |
void | VisitPreluLayer (const armnn::IConnectableLayer *layer, const char *name=nullptr) override |
void | VisitQuantizeLayer (const armnn::IConnectableLayer *layer, const char *name=nullptr) override |
void | VisitQuantizedLstmLayer (const armnn::IConnectableLayer *layer, const armnn::QuantizedLstmInputParams ¶ms, const char *name=nullptr) override |
void | VisitReshapeLayer (const armnn::IConnectableLayer *layer, const armnn::ReshapeDescriptor &reshapeDescriptor, const char *name=nullptr) override |
void | VisitResizeLayer (const armnn::IConnectableLayer *layer, const armnn::ResizeDescriptor &resizeDescriptor, const char *name=nullptr) override |
void | VisitResizeBilinearLayer (const armnn::IConnectableLayer *layer, const armnn::ResizeBilinearDescriptor &resizeDescriptor, const char *name=nullptr) override |
void | VisitRsqrtLayer (const armnn::IConnectableLayer *layer, const char *name=nullptr) override |
void | VisitSliceLayer (const armnn::IConnectableLayer *layer, const armnn::SliceDescriptor &sliceDescriptor, const char *name=nullptr) override |
void | VisitSoftmaxLayer (const armnn::IConnectableLayer *layer, const armnn::SoftmaxDescriptor &softmaxDescriptor, const char *name=nullptr) override |
void | VisitSpaceToBatchNdLayer (const armnn::IConnectableLayer *layer, const armnn::SpaceToBatchNdDescriptor &spaceToBatchNdDescriptor, const char *name=nullptr) override |
void | VisitSpaceToDepthLayer (const armnn::IConnectableLayer *layer, const armnn::SpaceToDepthDescriptor &spaceToDepthDescriptor, const char *name=nullptr) override |
void | VisitNormalizationLayer (const armnn::IConnectableLayer *layer, const armnn::NormalizationDescriptor &normalizationDescriptor, const char *name=nullptr) override |
void | VisitSplitterLayer (const armnn::IConnectableLayer *layer, const armnn::ViewsDescriptor &viewsDescriptor, const char *name=nullptr) override |
void | VisitStandInLayer (const armnn::IConnectableLayer *layer, const armnn::StandInDescriptor &standInDescriptor, const char *name=nullptr) override |
void | VisitStackLayer (const armnn::IConnectableLayer *layer, const armnn::StackDescriptor &stackDescriptor, const char *name=nullptr) override |
void | VisitStridedSliceLayer (const armnn::IConnectableLayer *layer, const armnn::StridedSliceDescriptor &stridedSliceDescriptor, const char *name=nullptr) override |
void | VisitSubtractionLayer (const armnn::IConnectableLayer *layer, const char *name=nullptr) override |
void | VisitSwitchLayer (const armnn::IConnectableLayer *layer, const char *name=nullptr) override |
void | VisitTransposeConvolution2dLayer (const armnn::IConnectableLayer *layer, const armnn::TransposeConvolution2dDescriptor &descriptor, const armnn::ConstTensor &weights, const armnn::Optional< armnn::ConstTensor > &biases, const char *=nullptr) override |
Public Member Functions inherited from ILayerVisitor | |
virtual void | StartVisit () |
virtual void | FinishVisit () |
Additional Inherited Members | |
Protected Member Functions inherited from ILayerVisitor | |
ILayerVisitor () | |
virtual | ~ILayerVisitor () |
Definition at line 21 of file Serializer.hpp.
|
inline |
Definition at line 24 of file Serializer.hpp.
|
inline |
Definition at line 25 of file Serializer.hpp.
|
inline |
Definition at line 27 of file Serializer.hpp.
|
inline |
Definition at line 32 of file Serializer.hpp.
|
inline |
Definition at line 37 of file Serializer.hpp.
|
inline |
Definition at line 42 of file Serializer.hpp.
References anchors(), ARMNN_DEPRECATED_MSG, SerializerVisitor::GetVersionTable(), SerializerVisitor::VisitAbsLayer(), SerializerVisitor::VisitActivationLayer(), SerializerVisitor::VisitAdditionLayer(), SerializerVisitor::VisitArgMinMaxLayer(), SerializerVisitor::VisitBatchNormalizationLayer(), SerializerVisitor::VisitBatchToSpaceNdLayer(), SerializerVisitor::VisitComparisonLayer(), SerializerVisitor::VisitConcatLayer(), SerializerVisitor::VisitConstantLayer(), SerializerVisitor::VisitConvolution2dLayer(), SerializerVisitor::VisitDepthToSpaceLayer(), SerializerVisitor::VisitDepthwiseConvolution2dLayer(), SerializerVisitor::VisitDequantizeLayer(), SerializerVisitor::VisitDetectionPostProcessLayer(), SerializerVisitor::VisitDivisionLayer(), SerializerVisitor::VisitElementwiseUnaryLayer(), SerializerVisitor::VisitEqualLayer(), SerializerVisitor::VisitFloorLayer(), SerializerVisitor::VisitFullyConnectedLayer(), SerializerVisitor::VisitGatherLayer(), SerializerVisitor::VisitGreaterLayer(), SerializerVisitor::VisitInputLayer(), SerializerVisitor::VisitInstanceNormalizationLayer(), SerializerVisitor::VisitL2NormalizationLayer(), SerializerVisitor::VisitLogSoftmaxLayer(), SerializerVisitor::VisitLstmLayer(), SerializerVisitor::VisitMaximumLayer(), SerializerVisitor::VisitMeanLayer(), SerializerVisitor::VisitMergeLayer(), SerializerVisitor::VisitMergerLayer(), SerializerVisitor::VisitMinimumLayer(), SerializerVisitor::VisitMultiplicationLayer(), SerializerVisitor::VisitNormalizationLayer(), SerializerVisitor::VisitOutputLayer(), SerializerVisitor::VisitPadLayer(), SerializerVisitor::VisitPermuteLayer(), SerializerVisitor::VisitPooling2dLayer(), SerializerVisitor::VisitPreluLayer(), SerializerVisitor::VisitQuantizedLstmLayer(), SerializerVisitor::VisitQuantizeLayer(), SerializerVisitor::VisitReshapeLayer(), SerializerVisitor::VisitResizeBilinearLayer(), SerializerVisitor::VisitResizeLayer(), SerializerVisitor::VisitRsqrtLayer(), SerializerVisitor::VisitSliceLayer(), SerializerVisitor::VisitSoftmaxLayer(), SerializerVisitor::VisitSpaceToBatchNdLayer(), SerializerVisitor::VisitSpaceToDepthLayer(), SerializerVisitor::VisitSplitterLayer(), SerializerVisitor::VisitStackLayer(), SerializerVisitor::VisitStandInLayer(), SerializerVisitor::VisitStridedSliceLayer(), SerializerVisitor::VisitSubtractionLayer(), SerializerVisitor::VisitSwitchLayer(), and SerializerVisitor::VisitTransposeConvolution2dLayer().
flatbuffers::Offset< armnnSerializer::FeatureCompatibilityVersions > GetVersionTable | ( | ) |
Definition at line 1452 of file Serializer.cpp.
References IOutputSlot::CalculateIndexOnOwner(), IInputSlot::GetConnection(), TensorInfo::GetDataType(), armnnSerializer::GetFlatBufferDataType(), IConnectableLayer::GetInputSlot(), TensorShape::GetNumDimensions(), IConnectableLayer::GetNumInputSlots(), IConnectableLayer::GetNumOutputSlots(), IConnectableLayer::GetOutputSlot(), IOutputSlot::GetOwningLayerGuid(), TensorInfo::GetQuantizationOffset(), TensorInfo::GetQuantizationScale(), TensorInfo::GetShape(), and IOutputSlot::GetTensorInfo().
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function an absolute layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 125 of file Serializer.cpp.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that an activation layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
activationDescriptor | - ActivationDescriptor to configure the activation. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 135 of file Serializer.cpp.
References armnnSerializer::GetFlatBufferActivationFunction(), ActivationDescriptor::m_A, ActivationDescriptor::m_B, and ActivationDescriptor::m_Function.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that an addition layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 160 of file Serializer.cpp.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that an arg min max layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
argMinMaxDescriptor | - ArgMinMaxDescriptor to configure the activation. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 175 of file Serializer.cpp.
References armnnSerializer::GetFlatBufferArgMinMaxFunction(), ArgMinMaxDescriptor::m_Axis, and ArgMinMaxDescriptor::m_Function.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that a batch normalization layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
mean | - Pre-calculated mean for each channel. |
variance | - Pre-calculated variance for each channel. |
beta | - Per-channel additive factor. |
gamma | - Per-channel multiplicative factor. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 228 of file Serializer.cpp.
References armnnSerializer::GetFlatBufferDataLayout(), BatchNormalizationDescriptor::m_DataLayout, and BatchNormalizationDescriptor::m_Eps.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that a batch to space ND layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
batchToSpaceNdDescriptor | - Description of the layer. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 198 of file Serializer.cpp.
References armnnSerializer::GetFlatBufferDataLayout(), BatchToSpaceNdDescriptor::m_BlockShape, BatchToSpaceNdDescriptor::m_Crops, and BatchToSpaceNdDescriptor::m_DataLayout.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function a Comparison layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
comparisonDescriptor | - Description of the layer. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 259 of file Serializer.cpp.
References armnnSerializer::GetFlatBufferComparisonOperation(), and ComparisonDescriptor::m_Operation.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that a concat layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
concatDescriptor | - ConcatDescriptor (synonym for OriginsDescriptor) to configure the concatenation process. Number of Views must be equal to the number of inputs, and their order must match - e.g. first view corresponds to the first input, second view to the second input, etc.... |
name | - Optional name for the layer. |
Reimplemented from ILayerVisitor.
Definition at line 725 of file Serializer.cpp.
References OriginsDescriptor::GetConcatAxis(), OriginsDescriptor::GetNumDimensions(), OriginsDescriptor::GetNumViews(), and OriginsDescriptor::GetViewOrigin().
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function a layer with no inputs and a single output, which always corresponds to the passed in constant tensor should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
input | - Tensor to be provided as the only output of the layer. The layer will maintain its own copy of the tensor data, meaning the memory referenced by input can be freed or reused after this function is called. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 275 of file Serializer.cpp.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that a 2D convolution layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
convolution2dDescriptor | - Description of the 2D convolution layer. |
weights | - Tensor for the weights data. |
biases | - Optional tensor for the bias data. If specified, must match the output tensor shape. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 296 of file Serializer.cpp.
References armnnSerializer::GetFlatBufferDataLayout(), OptionalBase::has_value(), Convolution2dDescriptor::m_BiasEnabled, Convolution2dDescriptor::m_DataLayout, Convolution2dDescriptor::m_DilationX, Convolution2dDescriptor::m_DilationY, Convolution2dDescriptor::m_PadBottom, Convolution2dDescriptor::m_PadLeft, Convolution2dDescriptor::m_PadRight, Convolution2dDescriptor::m_PadTop, Convolution2dDescriptor::m_StrideX, Convolution2dDescriptor::m_StrideY, and OptionalReferenceSwitch< IsReference, T >::value().
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function a depth to space layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
depthToSpaceDescriptor | - Parameters for the depth to space operation. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 337 of file Serializer.cpp.
References armnnSerializer::GetFlatBufferDataLayout(), SpaceToDepthDescriptor::m_BlockSize, and SpaceToDepthDescriptor::m_DataLayout.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that a 2D depthwise convolution layer with biases should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
convolution2dDescriptor | - Description of the 2D depthwise convolution layer. |
weights | - Tensor for the weights. Expected format: [channelMultiplier, inputChannels, height, width]. |
biases | - Optional tensor for the bias data. If specified, must match the output tensor shape. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 353 of file Serializer.cpp.
References armnnSerializer::GetFlatBufferDataLayout(), OptionalBase::has_value(), DepthwiseConvolution2dDescriptor::m_BiasEnabled, DepthwiseConvolution2dDescriptor::m_DataLayout, DepthwiseConvolution2dDescriptor::m_DilationX, DepthwiseConvolution2dDescriptor::m_DilationY, DepthwiseConvolution2dDescriptor::m_PadBottom, DepthwiseConvolution2dDescriptor::m_PadLeft, DepthwiseConvolution2dDescriptor::m_PadRight, DepthwiseConvolution2dDescriptor::m_PadTop, DepthwiseConvolution2dDescriptor::m_StrideX, DepthwiseConvolution2dDescriptor::m_StrideY, and OptionalReferenceSwitch< IsReference, T >::value().
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that a Dequantize layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 390 of file Serializer.cpp.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that a Detection PostProcess layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
descriptor | - Description of the Detection PostProcess layer. |
anchors | - Tensor for the anchors. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 401 of file Serializer.cpp.
References DetectionPostProcessDescriptor::m_DetectionsPerClass, DetectionPostProcessDescriptor::m_MaxClassesPerDetection, DetectionPostProcessDescriptor::m_MaxDetections, DetectionPostProcessDescriptor::m_NmsIouThreshold, DetectionPostProcessDescriptor::m_NmsScoreThreshold, DetectionPostProcessDescriptor::m_NumClasses, DetectionPostProcessDescriptor::m_ScaleH, DetectionPostProcessDescriptor::m_ScaleW, DetectionPostProcessDescriptor::m_ScaleX, DetectionPostProcessDescriptor::m_ScaleY, and DetectionPostProcessDescriptor::m_UseRegularNms.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function a division layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 432 of file Serializer.cpp.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function a ElementwiseUnary layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
elementwiseUnaryDescriptor | - Description of the layer. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 442 of file Serializer.cpp.
References armnnSerializer::GetFlatBufferUnaryOperation(), and ElementwiseUnaryDescriptor::m_Operation.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function an Equal layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 457 of file Serializer.cpp.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function a floor layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 467 of file Serializer.cpp.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that a fully connected layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
fullyConnectedDescriptor | - Description of the fully connected layer. |
weights | - Tensor for the weights data. |
biases | - Optional tensor for the bias data. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 998 of file Serializer.cpp.
References FullyConnectedDescriptor::m_BiasEnabled, FullyConnectedDescriptor::m_TransposeWeightMatrix, and OptionalReferenceSwitch< IsReference, T >::value().
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function a Gather layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 477 of file Serializer.cpp.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function a Greater layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 487 of file Serializer.cpp.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that an InputLayer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
id | - User generated id to uniquely identify a particular input. The same id needs to be specified when passing the inputs to the IRuntime::EnqueueWorkload() function. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 83 of file Serializer.cpp.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that an instance normalization layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
desc | - Parameters for the instance normalization operation. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 497 of file Serializer.cpp.
References armnnSerializer::GetFlatBufferDataLayout(), InstanceNormalizationDescriptor::m_Beta, InstanceNormalizationDescriptor::m_DataLayout, InstanceNormalizationDescriptor::m_Eps, and InstanceNormalizationDescriptor::m_Gamma.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that an L2 normalization layer should call back to when its Accept(ILayerVisitor&) function is invoked. Normalization is performed along dimension 1, but requires a 4d input.
layer | - pointer to the layer which is calling back to this visit function. |
desc | - Parameters for the L2 normalization operation. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 517 of file Serializer.cpp.
References armnnSerializer::GetFlatBufferDataLayout(), L2NormalizationDescriptor::m_DataLayout, and L2NormalizationDescriptor::m_Eps.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that a log softmax layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
logSoftmaxDescriptor | - LogSoftmaxDescriptor to configure the log softmax. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 538 of file Serializer.cpp.
References SoftmaxDescriptor::m_Axis, and SoftmaxDescriptor::m_Beta.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function an Lstm layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
descriptor | - Parameters controlling the operation of the Lstm operation. |
params | - The weights and biases for the LSTM cell. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 562 of file Serializer.cpp.
References LstmDescriptor::m_ActivationFunc, LstmInputParams::m_CellBias, LstmInputParams::m_CellLayerNormWeights, LstmInputParams::m_CellToForgetWeights, LstmInputParams::m_CellToInputWeights, LstmInputParams::m_CellToOutputWeights, LstmDescriptor::m_CifgEnabled, LstmDescriptor::m_ClippingThresCell, LstmDescriptor::m_ClippingThresProj, LstmInputParams::m_ForgetGateBias, LstmInputParams::m_ForgetLayerNormWeights, LstmInputParams::m_InputGateBias, LstmInputParams::m_InputLayerNormWeights, LstmInputParams::m_InputToCellWeights, LstmInputParams::m_InputToForgetWeights, LstmInputParams::m_InputToInputWeights, LstmInputParams::m_InputToOutputWeights, LstmDescriptor::m_LayerNormEnabled, LstmInputParams::m_OutputGateBias, LstmInputParams::m_OutputLayerNormWeights, LstmDescriptor::m_PeepholeEnabled, LstmInputParams::m_ProjectionBias, LstmDescriptor::m_ProjectionEnabled, LstmInputParams::m_ProjectionWeights, LstmInputParams::m_RecurrentToCellWeights, LstmInputParams::m_RecurrentToForgetWeights, LstmInputParams::m_RecurrentToInputWeights, and LstmInputParams::m_RecurrentToOutputWeights.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function a Maximum layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 670 of file Serializer.cpp.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function a Mean layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
meanDescriptor | - Parameters for the mean operation. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 680 of file Serializer.cpp.
References MeanDescriptor::m_Axis, and MeanDescriptor::m_KeepDims.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that a merge layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 708 of file Serializer.cpp.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that a merger layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
mergerDescriptor | - MergerDescriptor (synonym for OriginsDescriptor) to configure the concatenation process. Number of Views must be equal to the number of inputs, and their order must match - e.g. first view corresponds to the first input, second view to the second input, etc.... |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 718 of file Serializer.cpp.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function a Minimum layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 698 of file Serializer.cpp.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that a multiplication layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 760 of file Serializer.cpp.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that a normalization layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
normalizationDescriptor | - NormalizationDescriptor to configure the normalization. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 1154 of file Serializer.cpp.
References armnnSerializer::GetFlatBufferDataLayout(), armnnSerializer::GetFlatBufferNormalizationAlgorithmChannel(), armnnSerializer::GetFlatBufferNormalizationAlgorithmMethod(), NormalizationDescriptor::m_Alpha, NormalizationDescriptor::m_Beta, NormalizationDescriptor::m_DataLayout, NormalizationDescriptor::m_K, NormalizationDescriptor::m_NormChannelType, NormalizationDescriptor::m_NormMethodType, and NormalizationDescriptor::m_NormSize.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function an output layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
id | - User generated id to uniquely identify a particular output. The same id needs to be specified when passing the outputs to the IRuntime::EnqueueWorkload() function. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 105 of file Serializer.cpp.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function a pad layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
paddings | - n by 2 tensor, where n is the rank of the input tensor, such that paddings[i,0] indicates the amount of padding to add in front of dimension i, and paddings[i,1] indicates the amount of padding to add after the end of dimension i |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 771 of file Serializer.cpp.
References PadDescriptor::m_PadList, and PadDescriptor::m_PadValue.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that a permute layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
permuteDescriptor | - PermuteDescriptor to configure the permute. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 797 of file Serializer.cpp.
References PermutationVector::GetSize(), and PermuteDescriptor::m_DimMappings.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that a pooling layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
pooling2dDescriptor | - Pooling2dDescriptor to configure the pooling. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 943 of file Serializer.cpp.
References armnnSerializer::GetFlatBufferDataLayout(), armnnSerializer::GetFlatBufferOutputShapeRounding(), armnnSerializer::GetFlatBufferPaddingMethod(), armnnSerializer::GetFlatBufferPoolingAlgorithm(), Pooling2dDescriptor::m_DataLayout, Pooling2dDescriptor::m_OutputShapeRounding, Pooling2dDescriptor::m_PadBottom, Pooling2dDescriptor::m_PaddingMethod, Pooling2dDescriptor::m_PadLeft, Pooling2dDescriptor::m_PadRight, Pooling2dDescriptor::m_PadTop, Pooling2dDescriptor::m_PoolHeight, Pooling2dDescriptor::m_PoolType, Pooling2dDescriptor::m_PoolWidth, Pooling2dDescriptor::m_StrideX, and Pooling2dDescriptor::m_StrideY.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that a PReLU activation layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 972 of file Serializer.cpp.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function a QuantizedLstm layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
params | - The weights and biases for the Quantized LSTM cell |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 1302 of file Serializer.cpp.
References armnn::Boolean, armnn::Float16, armnn::Float32, QuantizedLstmInputParams::GetCellBias(), TensorInfo::GetDataType(), armnnSerializer::GetFlatBufferConstTensorData(), armnnSerializer::GetFlatBufferDataType(), QuantizedLstmInputParams::GetForgetGateBias(), IConnectableLayer::GetGuid(), BaseTensor< MemoryType >::GetInfo(), QuantizedLstmInputParams::GetInputGateBias(), QuantizedLstmInputParams::GetInputToCellWeights(), QuantizedLstmInputParams::GetInputToForgetWeights(), QuantizedLstmInputParams::GetInputToInputWeights(), QuantizedLstmInputParams::GetInputToOutputWeights(), BaseTensor< MemoryType >::GetMemoryArea(), IConnectableLayer::GetName(), BaseTensor< MemoryType >::GetNumBytes(), TensorShape::GetNumDimensions(), QuantizedLstmInputParams::GetOutputGateBias(), TensorInfo::GetQuantizationOffset(), TensorInfo::GetQuantizationScale(), QuantizedLstmInputParams::GetRecurrentToCellWeights(), QuantizedLstmInputParams::GetRecurrentToForgetWeights(), QuantizedLstmInputParams::GetRecurrentToInputWeights(), QuantizedLstmInputParams::GetRecurrentToOutputWeights(), TensorInfo::GetShape(), armnn::QAsymmU8, armnn::QSymmS16, and armnn::Signed32.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function a quantize layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 987 of file Serializer.cpp.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function a reshape layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
reshapeDescriptor | - Parameters for the reshape operation. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 825 of file Serializer.cpp.
References TensorShape::GetNumDimensions(), and ReshapeDescriptor::m_TargetShape.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that a resize bilinear layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
resizeDesc | - Parameters for the resize operation. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 851 of file Serializer.cpp.
References armnnSerializer::GetFlatBufferDataLayout(), ResizeBilinearDescriptor::m_DataLayout, ResizeBilinearDescriptor::m_TargetHeight, and ResizeBilinearDescriptor::m_TargetWidth.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that a resize layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
resizeDescriptor | - Parameters for the resize operation. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 872 of file Serializer.cpp.
References armnnSerializer::GetFlatBufferDataLayout(), armnnSerializer::GetFlatBufferResizeMethod(), ResizeDescriptor::m_DataLayout, ResizeDescriptor::m_Method, ResizeDescriptor::m_TargetHeight, and ResizeDescriptor::m_TargetWidth.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function a Reciprocal of square root layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 894 of file Serializer.cpp.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that a slice layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
sliceDescriptor | - SliceDescriptor to configure the slice operation. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 904 of file Serializer.cpp.
References SliceDescriptor::m_Begin, and SliceDescriptor::m_Size.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that a softmax layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
softmaxDescriptor | - SoftmaxDescriptor to configure the softmax. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 921 of file Serializer.cpp.
References SoftmaxDescriptor::m_Beta.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function a space to batch layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
spaceToBatchNdDescriptor | - Parameters for the space to batch operation. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 1037 of file Serializer.cpp.
References armnnSerializer::GetFlatBufferDataLayout(), SpaceToBatchNdDescriptor::m_BlockShape, SpaceToBatchNdDescriptor::m_DataLayout, and SpaceToBatchNdDescriptor::m_PadList.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function a space to depth layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
spaceToDepthDescriptor | - Parameters for the space to depth operation. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 1068 of file Serializer.cpp.
References armnnSerializer::GetFlatBufferDataLayout(), SpaceToDepthDescriptor::m_BlockSize, and SpaceToDepthDescriptor::m_DataLayout.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that a splitter layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
splitterDescriptor | - ViewsDescriptor to configure the splitting process. Number of Views must be equal to the number of outputs, and their order must match - e.g. first view corresponds to the first output, second view to the second output, etc.... |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 1088 of file Serializer.cpp.
References OriginsDescriptor::GetConcatAxis(), OriginsDescriptor::GetNumDimensions(), ViewsDescriptor::GetNumDimensions(), OriginsDescriptor::GetNumViews(), ViewsDescriptor::GetNumViews(), ViewsDescriptor::GetOrigins(), ViewsDescriptor::GetViewOrigin(), and ViewsDescriptor::GetViewSizes().
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function a stack layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
stackDescriptor | - Parameters for the stack operation. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 1179 of file Serializer.cpp.
References TensorShape::GetNumDimensions(), StackDescriptor::m_Axis, StackDescriptor::m_InputShape, and StackDescriptor::m_NumInputs.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function a StandInLayer should call back to when its Accept(ILaterVisitor&) function is invoked
layer | - pointer to the layer which is calling back to this visit function. |
standInDescriptor | - Parameters for the stand-in layer. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 1202 of file Serializer.cpp.
References StandInDescriptor::m_NumInputs, and StandInDescriptor::m_NumOutputs.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function a strided slice layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
stridedSliceDescriptor | - Parameters for the strided slice operation. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 1218 of file Serializer.cpp.
References armnnSerializer::GetFlatBufferDataLayout(), StridedSliceDescriptor::m_Begin, StridedSliceDescriptor::m_BeginMask, StridedSliceDescriptor::m_DataLayout, StridedSliceDescriptor::m_EllipsisMask, StridedSliceDescriptor::m_End, StridedSliceDescriptor::m_EndMask, StridedSliceDescriptor::m_NewAxisMask, StridedSliceDescriptor::m_ShrinkAxisMask, and StridedSliceDescriptor::m_Stride.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function a subtraction layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 1245 of file Serializer.cpp.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function a switch layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 1255 of file Serializer.cpp.
Referenced by SerializerVisitor::GetSerializedLayers().
|
overridevirtual |
Function that a 2D transpose convolution layer should call back to when its Accept(ILayerVisitor&) function is invoked.
layer | - pointer to the layer which is calling back to this visit function. |
descriptor | - Description of the 2D transpose convolution layer. |
weights | - Tensor for the weights data. |
biases | - Optional tensor for the bias data. |
name | - Optional name for the layer. |
Implements ILayerVisitor.
Definition at line 1265 of file Serializer.cpp.
References armnnSerializer::GetFlatBufferDataLayout(), OptionalBase::has_value(), TransposeConvolution2dDescriptor::m_BiasEnabled, TransposeConvolution2dDescriptor::m_DataLayout, TransposeConvolution2dDescriptor::m_PadBottom, TransposeConvolution2dDescriptor::m_PadLeft, TransposeConvolution2dDescriptor::m_PadRight, TransposeConvolution2dDescriptor::m_PadTop, TransposeConvolution2dDescriptor::m_StrideX, TransposeConvolution2dDescriptor::m_StrideY, and OptionalReferenceSwitch< IsReference, T >::value().
Referenced by SerializerVisitor::GetSerializedLayers().