20.02
|
#include <Deserializer.hpp>
Public Types | |
using | ConstTensorRawPtr = const armnnSerializer::ConstTensor * |
using | GraphPtr = const armnnSerializer::SerializedGraph * |
using | TensorRawPtr = const armnnSerializer::TensorInfo * |
using | PoolingDescriptor = const armnnSerializer::Pooling2dDescriptor * |
using | NormalizationDescriptorPtr = const armnnSerializer::NormalizationDescriptor * |
using | LstmDescriptorPtr = const armnnSerializer::LstmDescriptor * |
using | LstmInputParamsPtr = const armnnSerializer::LstmInputParams * |
using | QunatizedLstmInputParamsPtr = const armnnSerializer::QuantizedLstmInputParams * |
using | TensorRawPtrVector = std::vector< TensorRawPtr > |
using | LayerRawPtr = const armnnSerializer::LayerBase * |
using | LayerBaseRawPtr = const armnnSerializer::LayerBase * |
using | LayerBaseRawPtrVector = std::vector< LayerBaseRawPtr > |
Public Member Functions | |
armnn::INetworkPtr | CreateNetworkFromBinary (const std::vector< uint8_t > &binaryContent) override |
Create an input network from binary file contents. More... | |
armnn::INetworkPtr | CreateNetworkFromBinary (std::istream &binaryContent) override |
Create an input network from a binary input stream. More... | |
BindingPointInfo | GetNetworkInputBindingInfo (unsigned int layerId, const std::string &name) const override |
Retrieve binding info (layer id and tensor info) for the network input identified by the given layer name. More... | |
BindingPointInfo | GetNetworkOutputBindingInfo (unsigned int layerId, const std::string &name) const override |
Retrieve binding info (layer id and tensor info) for the network output identified by the given layer name. More... | |
Deserializer () | |
~Deserializer () | |
Static Public Member Functions | |
static GraphPtr | LoadGraphFromBinary (const uint8_t *binaryContent, size_t len) |
static TensorRawPtrVector | GetInputs (const GraphPtr &graph, unsigned int layerIndex) |
static TensorRawPtrVector | GetOutputs (const GraphPtr &graph, unsigned int layerIndex) |
static LayerBaseRawPtr | GetBaseLayer (const GraphPtr &graphPtr, unsigned int layerIndex) |
static int32_t | GetBindingLayerInfo (const GraphPtr &graphPtr, unsigned int layerIndex) |
static std::string | GetLayerName (const GraphPtr &graph, unsigned int index) |
static armnn::Pooling2dDescriptor | GetPoolingDescriptor (PoolingDescriptor pooling2dDescriptor, unsigned int layerIndex) |
static armnn::NormalizationDescriptor | GetNormalizationDescriptor (NormalizationDescriptorPtr normalizationDescriptor, unsigned int layerIndex) |
static armnn::LstmDescriptor | GetLstmDescriptor (LstmDescriptorPtr lstmDescriptor) |
static armnn::LstmInputParams | GetLstmInputParams (LstmDescriptorPtr lstmDescriptor, LstmInputParamsPtr lstmInputParams) |
static armnn::TensorInfo | OutputShapeOfReshape (const armnn::TensorInfo &inputTensorInfo, const std::vector< uint32_t > &targetDimsIn) |
Static Public Member Functions inherited from IDeserializer | |
static IDeserializer * | CreateRaw () |
static IDeserializerPtr | Create () |
static void | Destroy (IDeserializer *parser) |
Additional Inherited Members | |
Protected Member Functions inherited from IDeserializer | |
virtual | ~IDeserializer () |
Definition at line 16 of file Deserializer.hpp.
using ConstTensorRawPtr = const armnnSerializer::ConstTensor * |
Definition at line 20 of file Deserializer.hpp.
using GraphPtr = const armnnSerializer::SerializedGraph * |
Definition at line 21 of file Deserializer.hpp.
using LayerBaseRawPtr = const armnnSerializer::LayerBase * |
Definition at line 30 of file Deserializer.hpp.
using LayerBaseRawPtrVector = std::vector<LayerBaseRawPtr> |
Definition at line 31 of file Deserializer.hpp.
using LayerRawPtr = const armnnSerializer::LayerBase * |
Definition at line 29 of file Deserializer.hpp.
using LstmDescriptorPtr = const armnnSerializer::LstmDescriptor * |
Definition at line 25 of file Deserializer.hpp.
using LstmInputParamsPtr = const armnnSerializer::LstmInputParams * |
Definition at line 26 of file Deserializer.hpp.
using NormalizationDescriptorPtr = const armnnSerializer::NormalizationDescriptor * |
Definition at line 24 of file Deserializer.hpp.
using PoolingDescriptor = const armnnSerializer::Pooling2dDescriptor * |
Definition at line 23 of file Deserializer.hpp.
using QunatizedLstmInputParamsPtr = const armnnSerializer::QuantizedLstmInputParams * |
Definition at line 27 of file Deserializer.hpp.
using TensorRawPtr = const armnnSerializer::TensorInfo * |
Definition at line 22 of file Deserializer.hpp.
using TensorRawPtrVector = std::vector<TensorRawPtr> |
Definition at line 28 of file Deserializer.hpp.
Deserializer | ( | ) |
Definition at line 186 of file Deserializer.cpp.
Referenced by IDeserializer::CreateRaw(), and Deserializer::~Deserializer().
|
inline |
Definition at line 48 of file Deserializer.hpp.
References Deserializer::Deserializer(), Deserializer::GetBaseLayer(), Deserializer::GetBindingLayerInfo(), Deserializer::GetInputs(), Deserializer::GetLayerName(), Deserializer::GetLstmDescriptor(), Deserializer::GetLstmInputParams(), Deserializer::GetNormalizationDescriptor(), Deserializer::GetOutputs(), Deserializer::GetPoolingDescriptor(), Deserializer::LoadGraphFromBinary(), and Deserializer::OutputShapeOfReshape().
|
overridevirtual |
Create an input network from binary file contents.
Implements IDeserializer.
Definition at line 671 of file Deserializer.cpp.
References Deserializer::LoadGraphFromBinary().
|
overridevirtual |
Create an input network from a binary input stream.
Implements IDeserializer.
Definition at line 678 of file Deserializer.cpp.
References Deserializer::LoadGraphFromBinary().
|
static |
Definition at line 248 of file Deserializer.cpp.
Referenced by Deserializer::GetInputs(), Deserializer::GetLayerName(), Deserializer::GetNetworkOutputBindingInfo(), Deserializer::GetOutputs(), and Deserializer::~Deserializer().
|
static |
Definition at line 379 of file Deserializer.cpp.
Referenced by Deserializer::GetNetworkOutputBindingInfo(), and Deserializer::~Deserializer().
|
static |
Definition at line 601 of file Deserializer.cpp.
References CHECK_LAYERS, CHECKED_NON_NEGATIVE, and Deserializer::GetBaseLayer().
Referenced by Deserializer::GetLstmDescriptor(), Deserializer::GetNetworkOutputBindingInfo(), Deserializer::GetNormalizationDescriptor(), armnnDeserializer::GetOriginsDescriptor(), Deserializer::GetPoolingDescriptor(), Deserializer::OutputShapeOfReshape(), and Deserializer::~Deserializer().
|
static |
Definition at line 372 of file Deserializer.cpp.
References Deserializer::GetBaseLayer().
Referenced by Deserializer::GetLstmDescriptor(), Deserializer::GetNetworkOutputBindingInfo(), Deserializer::GetNormalizationDescriptor(), armnnDeserializer::GetOriginsDescriptor(), Deserializer::GetPoolingDescriptor(), Deserializer::OutputShapeOfReshape(), and Deserializer::~Deserializer().
|
static |
Definition at line 2465 of file Deserializer.cpp.
References CHECK_LAYERS, CHECK_LOCATION, CHECK_VALID_SIZE, Deserializer::GetInputs(), Deserializer::GetLayerName(), Deserializer::GetOutputs(), IConnectableLayer::GetOutputSlot(), TensorInfo::GetShape(), LstmDescriptor::m_ActivationFunc, TransposeConvolution2dDescriptor::m_BiasEnabled, QuantizedLstmInputParams::m_CellBias, LstmInputParams::m_CellBias, LstmInputParams::m_CellLayerNormWeights, LstmInputParams::m_CellToForgetWeights, LstmInputParams::m_CellToInputWeights, LstmInputParams::m_CellToOutputWeights, LstmDescriptor::m_CifgEnabled, LstmDescriptor::m_ClippingThresCell, LstmDescriptor::m_ClippingThresProj, TransposeConvolution2dDescriptor::m_DataLayout, QuantizedLstmInputParams::m_ForgetGateBias, LstmInputParams::m_ForgetGateBias, LstmInputParams::m_ForgetLayerNormWeights, QuantizedLstmInputParams::m_InputGateBias, LstmInputParams::m_InputGateBias, LstmInputParams::m_InputLayerNormWeights, QuantizedLstmInputParams::m_InputToCellWeights, LstmInputParams::m_InputToCellWeights, QuantizedLstmInputParams::m_InputToForgetWeights, LstmInputParams::m_InputToForgetWeights, QuantizedLstmInputParams::m_InputToInputWeights, LstmInputParams::m_InputToInputWeights, QuantizedLstmInputParams::m_InputToOutputWeights, LstmInputParams::m_InputToOutputWeights, LstmDescriptor::m_LayerNormEnabled, StandInDescriptor::m_NumInputs, StandInDescriptor::m_NumOutputs, QuantizedLstmInputParams::m_OutputGateBias, LstmInputParams::m_OutputGateBias, LstmInputParams::m_OutputLayerNormWeights, TransposeConvolution2dDescriptor::m_PadBottom, TransposeConvolution2dDescriptor::m_PadLeft, TransposeConvolution2dDescriptor::m_PadRight, TransposeConvolution2dDescriptor::m_PadTop, LstmDescriptor::m_PeepholeEnabled, LstmInputParams::m_ProjectionBias, LstmDescriptor::m_ProjectionEnabled, LstmInputParams::m_ProjectionWeights, QuantizedLstmInputParams::m_RecurrentToCellWeights, LstmInputParams::m_RecurrentToCellWeights, QuantizedLstmInputParams::m_RecurrentToForgetWeights, LstmInputParams::m_RecurrentToForgetWeights, QuantizedLstmInputParams::m_RecurrentToInputWeights, LstmInputParams::m_RecurrentToInputWeights, QuantizedLstmInputParams::m_RecurrentToOutputWeights, LstmInputParams::m_RecurrentToOutputWeights, TransposeConvolution2dDescriptor::m_StrideX, TransposeConvolution2dDescriptor::m_StrideY, IOutputSlot::SetTensorInfo(), armnnDeserializer::ToConstTensor(), armnnDeserializer::ToDataLayout(), and armnnDeserializer::ToTensorInfo().
Referenced by Deserializer::~Deserializer().
|
static |
Referenced by Deserializer::~Deserializer().
|
overridevirtual |
Retrieve binding info (layer id and tensor info) for the network input identified by the given layer name.
Implements IDeserializer.
Definition at line 746 of file Deserializer.cpp.
References CHECK_LOCATION, and armnn::IgnoreUnused().
|
overridevirtual |
Retrieve binding info (layer id and tensor info) for the network output identified by the given layer name.
Implements IDeserializer.
Definition at line 764 of file Deserializer.cpp.
References armnn::Abs, anchors(), CHECK_GRAPH, CHECK_LAYERS, CHECK_LOCATION, CHECK_VALID_SIZE, armnn::Equal, Deserializer::GetBaseLayer(), Deserializer::GetBindingLayerInfo(), Deserializer::GetInputs(), IConnectableLayer::GetInputSlot(), Deserializer::GetLayerName(), IConnectableLayer::GetNumInputSlots(), IConnectableLayer::GetNumOutputSlots(), Deserializer::GetOutputs(), IConnectableLayer::GetOutputSlot(), armnn::Greater, armnn::IgnoreUnused(), ActivationDescriptor::m_A, ArgMinMaxDescriptor::m_Axis, ActivationDescriptor::m_B, SoftmaxDescriptor::m_Beta, InstanceNormalizationDescriptor::m_Beta, Convolution2dDescriptor::m_BiasEnabled, DepthwiseConvolution2dDescriptor::m_BiasEnabled, BatchToSpaceNdDescriptor::m_BlockShape, SpaceToDepthDescriptor::m_BlockSize, BatchToSpaceNdDescriptor::m_Crops, Convolution2dDescriptor::m_DataLayout, DepthwiseConvolution2dDescriptor::m_DataLayout, L2NormalizationDescriptor::m_DataLayout, BatchNormalizationDescriptor::m_DataLayout, InstanceNormalizationDescriptor::m_DataLayout, BatchToSpaceNdDescriptor::m_DataLayout, SpaceToDepthDescriptor::m_DataLayout, DetectionPostProcessDescriptor::m_DetectionsPerClass, Convolution2dDescriptor::m_DilationX, DepthwiseConvolution2dDescriptor::m_DilationX, Convolution2dDescriptor::m_DilationY, DepthwiseConvolution2dDescriptor::m_DilationY, L2NormalizationDescriptor::m_Eps, BatchNormalizationDescriptor::m_Eps, InstanceNormalizationDescriptor::m_Eps, ActivationDescriptor::m_Function, ArgMinMaxDescriptor::m_Function, InstanceNormalizationDescriptor::m_Gamma, DetectionPostProcessDescriptor::m_MaxClassesPerDetection, DetectionPostProcessDescriptor::m_MaxDetections, DetectionPostProcessDescriptor::m_NmsIouThreshold, DetectionPostProcessDescriptor::m_NmsScoreThreshold, DetectionPostProcessDescriptor::m_NumClasses, Convolution2dDescriptor::m_PadBottom, DepthwiseConvolution2dDescriptor::m_PadBottom, Convolution2dDescriptor::m_PadLeft, DepthwiseConvolution2dDescriptor::m_PadLeft, Convolution2dDescriptor::m_PadRight, DepthwiseConvolution2dDescriptor::m_PadRight, Convolution2dDescriptor::m_PadTop, DepthwiseConvolution2dDescriptor::m_PadTop, DetectionPostProcessDescriptor::m_ScaleH, DetectionPostProcessDescriptor::m_ScaleW, DetectionPostProcessDescriptor::m_ScaleX, DetectionPostProcessDescriptor::m_ScaleY, Convolution2dDescriptor::m_StrideX, DepthwiseConvolution2dDescriptor::m_StrideX, Convolution2dDescriptor::m_StrideY, DepthwiseConvolution2dDescriptor::m_StrideY, DetectionPostProcessDescriptor::m_UseRegularNms, armnn::numeric_cast(), IOutputSlot::SetTensorInfo(), armnnDeserializer::ToActivationFunction(), armnnDeserializer::ToArgMinMaxFunction(), armnnDeserializer::ToConstTensor(), armnnDeserializer::ToDataLayout(), and armnnDeserializer::ToTensorInfo().
|
static |
Definition at line 2159 of file Deserializer.cpp.
References armnn::Across, CHECK_LAYERS, CHECK_LOCATION, CHECK_VALID_SIZE, Deserializer::GetInputs(), Deserializer::GetLayerName(), Deserializer::GetOutputs(), IConnectableLayer::GetOutputSlot(), armnn::IgnoreUnused(), armnn::LocalBrightness, armnn::LocalContrast, NormalizationDescriptor::m_Alpha, MeanDescriptor::m_Axis, SliceDescriptor::m_Begin, NormalizationDescriptor::m_Beta, NormalizationDescriptor::m_DataLayout, NormalizationDescriptor::m_K, MeanDescriptor::m_KeepDims, NormalizationDescriptor::m_NormChannelType, NormalizationDescriptor::m_NormMethodType, NormalizationDescriptor::m_NormSize, SliceDescriptor::m_Size, armnn::NCHW, armnn::NHWC, armnn::Rsqrt, IOutputSlot::SetTensorInfo(), ViewsDescriptor::SetViewOriginCoord(), ViewsDescriptor::SetViewSize(), armnnDeserializer::ToDataLayout(), armnnDeserializer::ToTensorInfo(), and armnn::Within.
Referenced by Deserializer::~Deserializer().
|
static |
Definition at line 619 of file Deserializer.cpp.
References CHECK_LAYERS, CHECK_LOCATION, and Deserializer::GetBaseLayer().
Referenced by Deserializer::GetLstmDescriptor(), Deserializer::GetNetworkOutputBindingInfo(), Deserializer::GetNormalizationDescriptor(), armnnDeserializer::GetOriginsDescriptor(), Deserializer::GetPoolingDescriptor(), Deserializer::OutputShapeOfReshape(), and Deserializer::~Deserializer().
|
static |
Definition at line 1808 of file Deserializer.cpp.
References armnn::Average, armnn::Ceiling, CHECK_LAYERS, CHECK_VALID_SIZE, armnn::Exclude, armnn::Floor, Deserializer::GetInputs(), Deserializer::GetLayerName(), Deserializer::GetOutputs(), IConnectableLayer::GetOutputSlot(), armnn::IgnoreUnused(), armnn::IgnoreValue, 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, Pooling2dDescriptor::m_StrideY, armnn::Max, armnn::NCHW, armnn::NHWC, IOutputSlot::SetTensorInfo(), and armnnDeserializer::ToTensorInfo().
Referenced by Deserializer::~Deserializer().
|
static |
Definition at line 686 of file Deserializer.cpp.
References CHECK_LOCATION, and IOutputSlot::Connect().
Referenced by Deserializer::CreateNetworkFromBinary(), and Deserializer::~Deserializer().
|
static |
Definition at line 1938 of file Deserializer.cpp.
References armnn::Bilinear, CHECK_LAYERS, CHECK_LOCATION, CHECK_VALID_SIZE, armnnDeserializer::CheckShape(), Deserializer::GetInputs(), Deserializer::GetLayerName(), TensorInfo::GetNumElements(), Deserializer::GetOutputs(), IConnectableLayer::GetOutputSlot(), TensorInfo::GetShape(), SoftmaxDescriptor::m_Beta, SpaceToBatchNdDescriptor::m_BlockShape, SpaceToDepthDescriptor::m_BlockSize, ResizeDescriptor::m_DataLayout, SpaceToBatchNdDescriptor::m_DataLayout, SpaceToDepthDescriptor::m_DataLayout, ResizeDescriptor::m_Method, SpaceToBatchNdDescriptor::m_PadList, ResizeDescriptor::m_TargetHeight, ReshapeDescriptor::m_TargetShape, ResizeDescriptor::m_TargetWidth, armnn::numeric_cast(), TensorInfo::SetShape(), IOutputSlot::SetTensorInfo(), armnnDeserializer::ToDataLayout(), armnnDeserializer::ToResizeMethod(), and armnnDeserializer::ToTensorInfo().
Referenced by Deserializer::~Deserializer().