20.02
|
Classes | |
class | ITfParser |
Parses a directed acyclic graph from a tensorflow protobuf file. More... | |
class | TfParser |
struct | WithOutputTensorIndex |
WithOutputTensorIndex wraps a value and an index. More... | |
Typedefs | |
using | BindingPointInfo = armnn::BindingPointInfo |
using | ITfParserPtr = std::unique_ptr< ITfParser, void(*)(ITfParser *parser)> |
using | ParsedTfOperationPtr = std::unique_ptr< ParsedTfOperation > |
using | OutputOfParsedTfOperation = WithOutputTensorIndex< ParsedTfOperation * > |
using | OutputOfConstNodeDef = WithOutputTensorIndex< const tensorflow::NodeDef * > |
using | OutputId = WithOutputTensorIndex< std::string > |
Functions | |
void | CalculateSamePadding (uint32_t inputSize, uint32_t stride, uint32_t filterSize, bool samePadding, uint32_t *paddingFront, uint32_t *paddingBack) |
void | CalcPadding (uint32_t input, uint32_t kernel, uint32_t stride, uint32_t &outPadHead, uint32_t &outPadTail, bool samePadding) |
DataType | ConvertTfTensorDataType (const tensorflow::DataType tfDataType, const tensorflow::NodeDef &nodeDef) |
TensorInfo | OutputShapeOfExpandDims (const tensorflow::NodeDef &nodeDef, TensorInfo inputTensorInfo) |
unsigned int | CheckPaddingTensor (const ConstTensor &paddingTensor, const TensorInfo &inputTensorInfo, const std::string &nodeName) |
TensorInfo | CalculatePaddedOutputTensorInfo (const TensorInfo &inputTensorInfo, const std::vector< std::pair< unsigned int, unsigned int >> &padList) |
TensorInfo | OutputShapeOfSqueeze (const tensorflow::NodeDef &nodeDef, TensorInfo inputTensorInfo) |
Definition at line 19 of file ITfParser.hpp.
using ITfParserPtr = std::unique_ptr<ITfParser, void(*)(ITfParser* parser)> |
Definition at line 22 of file ITfParser.hpp.
using OutputId = WithOutputTensorIndex<std::string> |
Definition at line 62 of file TfParser.hpp.
using OutputOfConstNodeDef = WithOutputTensorIndex<const tensorflow::NodeDef*> |
Definition at line 61 of file TfParser.hpp.
using OutputOfParsedTfOperation = WithOutputTensorIndex<ParsedTfOperation *> |
Definition at line 60 of file TfParser.hpp.
using ParsedTfOperationPtr = std::unique_ptr<ParsedTfOperation> |
Definition at line 35 of file TfParser.hpp.
void armnnTfParser::CalcPadding | ( | uint32_t | input, |
uint32_t | kernel, | ||
uint32_t | stride, | ||
uint32_t & | outPadHead, | ||
uint32_t & | outPadTail, | ||
bool | samePadding | ||
) |
Definition at line 421 of file TfParser.cpp.
References CalculateSamePadding(), CHECK_LOCATION, Layer::GetName(), Layer::GetNumOutputSlots(), Layer::GetOutputSlot(), and m_Layer.
Referenced by ConvertTfTensorDataType(), TfLiteParser::CreateNetworkFromBinary(), OnnxParser::CreateNetworkFromString(), and OutputShapeOfSqueeze().
TensorInfo armnnTfParser::CalculatePaddedOutputTensorInfo | ( | const TensorInfo & | inputTensorInfo, |
const std::vector< std::pair< unsigned int, unsigned int >> & | padList | ||
) |
Definition at line 2138 of file TfParser.cpp.
References INetwork::AddConcatLayer(), INetwork::AddPadLayer(), INetwork::AddReshapeLayer(), INetwork::AddResizeLayer(), armnn::Bilinear, CHECK_LOCATION, CheckPaddingTensor(), IOutputSlot::Connect(), armnn::Float32, IConnectableLayer::GetInputSlot(), TensorInfo::GetNumDimensions(), IConnectableLayer::GetOutputSlot(), TensorInfo::GetShape(), IOutputSlot::GetTensorInfo(), OriginsDescriptor::GetViewOrigin(), armnn::IgnoreUnused(), ResizeDescriptor::m_DataLayout, ResizeDescriptor::m_Method, ResizeDescriptor::m_TargetHeight, ReshapeDescriptor::m_TargetShape, ResizeDescriptor::m_TargetWidth, armnn::NHWC, OriginsDescriptor::SetConcatAxis(), TensorInfo::SetShape(), IOutputSlot::SetTensorInfo(), and OriginsDescriptor::SetViewOriginCoord().
|
inline |
unsigned int armnnTfParser::CheckPaddingTensor | ( | const ConstTensor & | paddingTensor, |
const TensorInfo & | inputTensorInfo, | ||
const std::string & | nodeName | ||
) |
Definition at line 2106 of file TfParser.cpp.
References CHECK_LOCATION, TensorInfo::GetNumDimensions(), and BaseTensor< MemoryType >::GetShape().
Referenced by CalculatePaddedOutputTensorInfo().
DataType armnnTfParser::ConvertTfTensorDataType | ( | const tensorflow::DataType | tfDataType, |
const tensorflow::NodeDef & | nodeDef | ||
) |
Definition at line 933 of file TfParser.cpp.
References INetwork::AddConvolution2dLayer(), INetwork::AddDepthwiseConvolution2dLayer(), CalcPadding(), CHECK_DATA_FORMAT, CHECK_LOCATION, CHECK_PADDING_TYPE, IOutputSlot::Connect(), armnn::GetDataTypeSize(), DataLayoutIndexed::GetHeightIndex(), IConnectableLayer::GetInputSlot(), TensorInfo::GetNumElements(), IConnectableLayer::GetOutputSlot(), TensorInfo::GetShape(), BaseTensor< MemoryType >::GetShape(), IOutputSlot::GetTensorInfo(), DataLayoutIndexed::GetWidthIndex(), armnn::IgnoreUnused(), Convolution2dDescriptor::m_BiasEnabled, DepthwiseConvolution2dDescriptor::m_BiasEnabled, Convolution2dDescriptor::m_DataLayout, DepthwiseConvolution2dDescriptor::m_DataLayout, Convolution2dDescriptor::m_PadBottom, DepthwiseConvolution2dDescriptor::m_PadBottom, Convolution2dDescriptor::m_PadLeft, DepthwiseConvolution2dDescriptor::m_PadLeft, Convolution2dDescriptor::m_PadRight, DepthwiseConvolution2dDescriptor::m_PadRight, Convolution2dDescriptor::m_PadTop, DepthwiseConvolution2dDescriptor::m_PadTop, Convolution2dDescriptor::m_StrideX, DepthwiseConvolution2dDescriptor::m_StrideX, Convolution2dDescriptor::m_StrideY, DepthwiseConvolution2dDescriptor::m_StrideY, armnnUtils::Permute(), armnnUtils::Permuted(), and IOutputSlot::SetTensorInfo().
TensorInfo armnnTfParser::OutputShapeOfExpandDims | ( | const tensorflow::NodeDef & | nodeDef, |
TensorInfo | inputTensorInfo | ||
) |
Definition at line 1468 of file TfParser.cpp.
References INetwork::AddActivationLayer(), INetwork::AddBatchNormalizationLayer(), INetwork::AddComparisonLayer(), INetwork::AddGatherLayer(), INetwork::AddMinimumLayer(), INetwork::AddReshapeLayer(), INetwork::AddStackLayer(), INetwork::AddSubtractionLayer(), INetwork::AddTransposeLayer(), CHECK_DATA_FORMAT, CHECK_LOCATION, IOutputSlot::Connect(), TensorInfo::GetDataType(), IConnectableLayer::GetInputSlot(), TensorShape::GetNumDimensions(), TensorInfo::GetNumDimensions(), IConnectableLayer::GetOutputSlot(), TensorInfo::GetShape(), IOutputSlot::GetTensorInfo(), armnn::IgnoreUnused(), ActivationDescriptor::m_A, StackDescriptor::m_Axis, BatchNormalizationDescriptor::m_DataLayout, BatchNormalizationDescriptor::m_Eps, ActivationDescriptor::m_Function, WithOutputTensorIndex< T >::m_Index, WithOutputTensorIndex< T >::m_IndexedValue, StackDescriptor::m_InputShape, StackDescriptor::m_NumInputs, ReshapeDescriptor::m_TargetShape, armnn::numeric_cast(), TensorInfo::SetDataType(), TensorInfo::SetShape(), IOutputSlot::SetTensorInfo(), and armnnUtils::TransposeTensorShape().
TensorInfo armnnTfParser::OutputShapeOfSqueeze | ( | const tensorflow::NodeDef & | nodeDef, |
TensorInfo | inputTensorInfo | ||
) |
Definition at line 2463 of file TfParser.cpp.
References INetwork::AddActivationLayer(), INetwork::AddAdditionLayer(), INetwork::AddDivisionLayer(), INetwork::AddElementwiseUnaryLayer(), INetwork::AddFullyConnectedLayer(), INetwork::AddInputLayer(), INetwork::AddMaximumLayer(), INetwork::AddMeanLayer(), INetwork::AddMultiplicationLayer(), INetwork::AddNormalizationLayer(), INetwork::AddOutputLayer(), INetwork::AddPooling2dLayer(), INetwork::AddReshapeLayer(), INetwork::AddSoftmaxLayer(), INetwork::AddSplitterLayer(), INetwork::AddStridedSliceLayer(), CalcPadding(), armnnUtils::CalculateReducedOutputTensoInfo(), armnnUtils::CalculateStridedSliceOutputTensorInfo(), CHECK_DATA_FORMAT, CHECK_LOCATION, CHECK_PADDING_TYPE, IOutputSlot::Connect(), TensorInfo::GetDataType(), DataLayoutIndexed::GetHeightIndex(), IConnectableLayer::GetInputSlot(), TensorShape::GetNumDimensions(), TensorInfo::GetNumDimensions(), IConnectableLayer::GetNumOutputSlots(), IConnectableLayer::GetOutputSlot(), TensorInfo::GetShape(), BaseTensor< MemoryType >::GetShape(), IOutputSlot::GetTensorInfo(), DataLayoutIndexed::GetWidthIndex(), armnn::IgnoreUnused(), ActivationDescriptor::m_A, NormalizationDescriptor::m_Alpha, MeanDescriptor::m_Axis, ActivationDescriptor::m_B, StridedSliceDescriptor::m_Begin, StridedSliceDescriptor::m_BeginMask, NormalizationDescriptor::m_Beta, FullyConnectedDescriptor::m_BiasEnabled, Pooling2dDescriptor::m_DataLayout, NormalizationDescriptor::m_DataLayout, StridedSliceDescriptor::m_DataLayout, StridedSliceDescriptor::m_EllipsisMask, StridedSliceDescriptor::m_End, StridedSliceDescriptor::m_EndMask, ActivationDescriptor::m_Function, NormalizationDescriptor::m_K, MeanDescriptor::m_KeepDims, m_Layer, StridedSliceDescriptor::m_NewAxisMask, NormalizationDescriptor::m_NormChannelType, NormalizationDescriptor::m_NormMethodType, NormalizationDescriptor::m_NormSize, 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, StridedSliceDescriptor::m_ShrinkAxisMask, StridedSliceDescriptor::m_Stride, Pooling2dDescriptor::m_StrideX, Pooling2dDescriptor::m_StrideY, ReshapeDescriptor::m_TargetShape, armnn::NHWC, armnn::numeric_cast(), TfParser::ParsedMatMulTfOperation, TfParser::ParsedMulTfOperation, TensorInfo::SetShape(), IOutputSlot::SetTensorInfo(), ViewsDescriptor::SetViewOriginCoord(), and ViewsDescriptor::SetViewSize().