21.02
|
#include <CaffeParser.hpp>
Public Member Functions | |
armnn::INetworkPtr | CreateNetworkFromTextFile (const char *graphFile, const std::map< std::string, armnn::TensorShape > &inputShapes, const std::vector< std::string > &requestedOutputs) |
Create the network from a protobuf text file on disk. More... | |
virtual armnn::INetworkPtr | CreateNetworkFromBinaryFile (const char *graphFile, const std::map< std::string, armnn::TensorShape > &inputShapes, const std::vector< std::string > &requestedOutputs)=0 |
Create the network from a protobuf binary file on the disk. More... | |
armnn::INetworkPtr | CreateNetworkFromString (const char *protoText, const std::map< std::string, armnn::TensorShape > &inputShapes, const std::vector< std::string > &requestedOutputs) |
Creates the network directly from protobuf text in a string. Useful for debugging/testing. More... | |
BindingPointInfo | GetNetworkInputBindingInfo (const std::string &name) const |
Retrieves binding info (layer id and tensor info) for the network input identified by the given layer name. More... | |
BindingPointInfo | GetNetworkOutputBindingInfo (const std::string &name) const |
Retrieves binding info (layer id and tensor info) for the network output identified by the given layer name. More... | |
CaffeParserImpl () | |
virtual | ~CaffeParserImpl ()=default |
Static Public Member Functions | |
static const std::string | GetVersion () |
Retrieve version in X.Y.Z form. More... | |
Protected Types | |
using | OperationParsingFunction = void(CaffeParserImpl::*)(const caffe::LayerParameter &layerParam) |
Protected Member Functions | |
armnn::TensorInfo | BlobShapeToTensorInfo (const caffe::BlobShape &blobShape) const |
Converts Caffe's protobuf tensor shape format to ArmNN's. More... | |
void | TrackInputBinding (armnn::IConnectableLayer *layer, armnn::LayerBindingId id, const armnn::TensorInfo &tensorInfo) |
void | TrackOutputBinding (armnn::IConnectableLayer *layer, armnn::LayerBindingId id, const armnn::TensorInfo &tensorInfo) |
void | SetArmnnOutputSlotForCaffeTop (const std::string &caffeTopName, armnn::IOutputSlot &armnnOutputSlot) |
armnn::IOutputSlot & | GetArmnnOutputSlotForCaffeTop (const std::string &caffeTopName) const |
Retrieves the Armnn IOutputSlot representing the given Caffe top. More... | |
void | Cleanup () |
armnn::INetworkPtr | CreateNetworkFromNetParameter (caffe::NetParameter &netParam, const std::map< std::string, armnn::TensorShape > &inputShapes, const std::vector< std::string > &requestedOutputs) |
Parses a NetParameter loaded into memory from one of the other CreateNetwork*. More... | |
void | LoadNetParam (caffe::NetParameter &netParameter) |
does the actual conversion from caffe::NetParameter to armnn::INetwork More... | |
std::vector< const caffe::LayerParameter * > | GetInputs (const caffe::LayerParameter &layerParam) |
Find the Caffe layers listed as inputs (bottoms) for a given layer. More... | |
void | ResolveInPlaceLayers (caffe::NetParameter &netParameter) |
Modifies the Caffe network to replace "in-place" layers (whose top() and bottom() are both the same) with regular layers. More... | |
void | ParseInputLayer (const caffe::LayerParameter &layerParam) |
Adds an armnn layer to m_Network given a Caffe LayerParameter of the correct type and is responsible for recording any newly created IOutputSlots using SetArmnnOutputSlotForCaffeTop(). More... | |
void | ParseConvLayer (const caffe::LayerParameter &layerParam) |
void | ParseDeconvLayer (const caffe::LayerParameter &layerParam) |
void | ParsePoolingLayer (const caffe::LayerParameter &layerParam) |
void | ParseReluLayer (const caffe::LayerParameter &layerParam) |
void | ParseLRNLayer (const caffe::LayerParameter &layerParam) |
void | ParseInnerProductLayer (const caffe::LayerParameter &layerParam) |
void | ParseSoftmaxLayer (const caffe::LayerParameter &layerParam) |
void | ParseEltwiseLayer (const caffe::LayerParameter &layerParam) |
void | ParseConcatLayer (const caffe::LayerParameter &layerParam) |
void | ParseBatchNormLayer (const caffe::LayerParameter &layerParam) |
void | ParseScaleLayer (const caffe::LayerParameter &layerParam) |
void | ParseSplitLayer (const caffe::LayerParameter &layerParam) |
void | ParseDropoutLayer (const caffe::LayerParameter &layerParam) |
void | ParseArgmaxLayer (const caffe::LayerParameter &layerParam) |
void | AddConvLayerWithSplits (const caffe::LayerParameter &layerParam, const armnn::Convolution2dDescriptor &desc, unsigned int kernelW, unsigned int kernelH) |
ParseConv may use these helpers depending on the group parameter. More... | |
void | AddConvLayerWithDepthwiseConv (const caffe::LayerParameter &layerParam, const armnn::Convolution2dDescriptor &desc, unsigned int kernelW, unsigned int kernelH) |
void | AddDeconvLayerWithSplits (const caffe::LayerParameter &layerParam, const armnn::TransposeConvolution2dDescriptor &desc, unsigned int kernelW, unsigned int kernelH) |
Static Protected Member Functions | |
static void | TrackBindingPoint (armnn::IConnectableLayer *layer, armnn::LayerBindingId id, const armnn::TensorInfo &tensorInfo, const char *bindingPointDesc, std::unordered_map< std::string, BindingPointInfo > &nameToBindingInfo) |
static std::pair< armnn::LayerBindingId, armnn::TensorInfo > | GetBindingInfo (const std::string &layerName, const char *bindingPointDesc, const std::unordered_map< std::string, BindingPointInfo > &bindingInfos) |
Protected Attributes | |
std::unordered_map< std::string, BindingPointInfo > | m_NetworkInputsBindingInfo |
maps input layer names to their corresponding ids and tensor infos More... | |
std::unordered_map< std::string, BindingPointInfo > | m_NetworkOutputsBindingInfo |
maps output layer names to their corresponding ids and tensor infos More... | |
armnn::INetworkPtr | m_Network |
std::map< std::string, armnn::TensorShape > | m_InputShapes |
std::unordered_map< std::string, armnn::IOutputSlot * > | m_ArmnnOutputSlotForCaffeTop |
As we add armnn layers we store the armnn IOutputSlot which corresponds to the Caffe tops. More... | |
std::vector< std::string > | m_RequestedOutputs |
std::map< std::string, const caffe::LayerParameter * > | m_CaffeLayersByTopName |
Static Protected Attributes | |
static const std::map< std::string, OperationParsingFunction > | ms_CaffeLayerNameToParsingFunctions |
Maps Caffe layer names to parsing member functions. More... | |
Definition at line 26 of file CaffeParser.hpp.
|
protected |
Definition at line 131 of file CaffeParser.hpp.
CaffeParserImpl | ( | ) |
Definition at line 310 of file CaffeParser.cpp.
|
virtualdefault |
|
protected |
Definition at line 825 of file CaffeParser.cpp.
References ARMNN_ASSERT, ICaffeParser::CaffeParserImpl::BlobShapeToTensorInfo(), CHECK_LOCATION, IOutputSlot::Connect(), ICaffeParser::CaffeParserImpl::GetArmnnOutputSlotForCaffeTop(), armnnUtils::GetTensorInfo(), Convolution2dDescriptor::m_BiasEnabled, Convolution2dDescriptor::m_DilationX, Convolution2dDescriptor::m_DilationY, ICaffeParser::CaffeParserImpl::m_Network, Convolution2dDescriptor::m_PadBottom, Convolution2dDescriptor::m_PadLeft, DepthwiseConvolution2dDescriptor::m_PadLeft, Convolution2dDescriptor::m_PadRight, Convolution2dDescriptor::m_PadTop, Convolution2dDescriptor::m_StrideX, Convolution2dDescriptor::m_StrideY, armnn::numeric_cast(), ICaffeParser::CaffeParserImpl::SetArmnnOutputSlotForCaffeTop(), and armnnCaffeParser::TensorDescToBlobShape().
Referenced by ICaffeParser::CaffeParserImpl::ParseConvLayer().
|
protected |
ParseConv may use these helpers depending on the group parameter.
Definition at line 447 of file CaffeParser.cpp.
References ARMNN_ASSERT, ICaffeParser::CaffeParserImpl::BlobShapeToTensorInfo(), CHECK_LOCATION, IOutputSlot::Connect(), ICaffeParser::CaffeParserImpl::GetArmnnOutputSlotForCaffeTop(), IConnectableLayer::GetInputSlot(), IConnectableLayer::GetNumOutputSlots(), IConnectableLayer::GetOutputSlot(), armnnUtils::GetTensorInfo(), Convolution2dDescriptor::m_BiasEnabled, Convolution2dDescriptor::m_DilationX, Convolution2dDescriptor::m_DilationY, ICaffeParser::CaffeParserImpl::m_Network, Convolution2dDescriptor::m_PadBottom, Convolution2dDescriptor::m_PadRight, Convolution2dDescriptor::m_StrideX, Convolution2dDescriptor::m_StrideY, armnn::numeric_cast(), ICaffeParser::CaffeParserImpl::SetArmnnOutputSlotForCaffeTop(), IOutputSlot::SetTensorInfo(), OriginsDescriptor::SetViewOriginCoord(), ViewsDescriptor::SetViewOriginCoord(), ViewsDescriptor::SetViewSize(), and armnnCaffeParser::TensorDescToBlobShape().
Referenced by ICaffeParser::CaffeParserImpl::ParseConvLayer().
|
protected |
Definition at line 637 of file CaffeParser.cpp.
References ARMNN_ASSERT, ICaffeParser::CaffeParserImpl::BlobShapeToTensorInfo(), CHECK_LOCATION, IOutputSlot::Connect(), ICaffeParser::CaffeParserImpl::GetArmnnOutputSlotForCaffeTop(), IConnectableLayer::GetInputSlot(), IConnectableLayer::GetNumOutputSlots(), IConnectableLayer::GetOutputSlot(), armnnUtils::GetTensorInfo(), TransposeConvolution2dDescriptor::m_BiasEnabled, ICaffeParser::CaffeParserImpl::m_Network, TransposeConvolution2dDescriptor::m_PadBottom, TransposeConvolution2dDescriptor::m_PadRight, TransposeConvolution2dDescriptor::m_StrideX, TransposeConvolution2dDescriptor::m_StrideY, armnn::numeric_cast(), ICaffeParser::CaffeParserImpl::SetArmnnOutputSlotForCaffeTop(), IOutputSlot::SetTensorInfo(), OriginsDescriptor::SetViewOriginCoord(), ViewsDescriptor::SetViewOriginCoord(), ViewsDescriptor::SetViewSize(), and armnnCaffeParser::TensorDescToBlobShape().
Referenced by ICaffeParser::CaffeParserImpl::ParseDeconvLayer().
|
protected |
Converts Caffe's protobuf tensor shape format to ArmNN's.
Definition at line 349 of file CaffeParser.cpp.
Referenced by ICaffeParser::CaffeParserImpl::AddConvLayerWithDepthwiseConv(), ICaffeParser::CaffeParserImpl::AddConvLayerWithSplits(), ICaffeParser::CaffeParserImpl::AddDeconvLayerWithSplits(), ICaffeParser::CaffeParserImpl::ParseConvLayer(), ICaffeParser::CaffeParserImpl::ParseDeconvLayer(), and ICaffeParser::CaffeParserImpl::ParseInputLayer().
|
protected |
Definition at line 2261 of file CaffeParser.cpp.
References ICaffeParser::CaffeParserImpl::m_ArmnnOutputSlotForCaffeTop, ICaffeParser::CaffeParserImpl::m_CaffeLayersByTopName, ICaffeParser::CaffeParserImpl::m_InputShapes, and ICaffeParser::CaffeParserImpl::m_RequestedOutputs.
Referenced by RecordByRecordCaffeParser::CreateNetworkFromBinaryFile(), and ICaffeParser::CaffeParserImpl::CreateNetworkFromNetParameter().
|
pure virtual |
Create the network from a protobuf binary file on the disk.
Implemented in CaffeParser, and RecordByRecordCaffeParser.
|
protected |
Parses a NetParameter loaded into memory from one of the other CreateNetwork*.
Definition at line 2225 of file CaffeParser.cpp.
References ICaffeParser::CaffeParserImpl::Cleanup(), INetwork::Create(), ICaffeParser::CaffeParserImpl::LoadNetParam(), ICaffeParser::CaffeParserImpl::m_InputShapes, ICaffeParser::CaffeParserImpl::m_Network, ICaffeParser::CaffeParserImpl::m_NetworkInputsBindingInfo, ICaffeParser::CaffeParserImpl::m_NetworkOutputsBindingInfo, and ICaffeParser::CaffeParserImpl::m_RequestedOutputs.
Referenced by CaffeParser::CreateNetworkFromBinaryFile(), ICaffeParser::CaffeParserImpl::CreateNetworkFromString(), and ICaffeParser::CaffeParserImpl::CreateNetworkFromTextFile().
INetworkPtr CreateNetworkFromString | ( | const char * | protoText, |
const std::map< std::string, armnn::TensorShape > & | inputShapes, | ||
const std::vector< std::string > & | requestedOutputs | ||
) |
Creates the network directly from protobuf text in a string. Useful for debugging/testing.
Definition at line 2171 of file CaffeParser.cpp.
References CHECK_LOCATION, and ICaffeParser::CaffeParserImpl::CreateNetworkFromNetParameter().
INetworkPtr CreateNetworkFromTextFile | ( | const char * | graphFile, |
const std::map< std::string, armnn::TensorShape > & | inputShapes, | ||
const std::vector< std::string > & | requestedOutputs | ||
) |
Create the network from a protobuf text file on disk.
Definition at line 2139 of file CaffeParser.cpp.
References CHECK_LOCATION, and ICaffeParser::CaffeParserImpl::CreateNetworkFromNetParameter().
|
protected |
Retrieves the Armnn IOutputSlot representing the given Caffe top.
Throws if it cannot be found (e.g. not parsed yet).
Definition at line 1952 of file CaffeParser.cpp.
References CHECK_LOCATION, and ICaffeParser::CaffeParserImpl::m_ArmnnOutputSlotForCaffeTop.
Referenced by ICaffeParser::CaffeParserImpl::AddConvLayerWithDepthwiseConv(), ICaffeParser::CaffeParserImpl::AddConvLayerWithSplits(), ICaffeParser::CaffeParserImpl::AddDeconvLayerWithSplits(), RecordByRecordCaffeParser::CreateNetworkFromBinaryFile(), ICaffeParser::CaffeParserImpl::LoadNetParam(), ICaffeParser::CaffeParserImpl::ParseArgmaxLayer(), ICaffeParser::CaffeParserImpl::ParseBatchNormLayer(), ICaffeParser::CaffeParserImpl::ParseConcatLayer(), ICaffeParser::CaffeParserImpl::ParseConvLayer(), ICaffeParser::CaffeParserImpl::ParseDeconvLayer(), ICaffeParser::CaffeParserImpl::ParseDropoutLayer(), ICaffeParser::CaffeParserImpl::ParseEltwiseLayer(), ICaffeParser::CaffeParserImpl::ParseInnerProductLayer(), ICaffeParser::CaffeParserImpl::ParseLRNLayer(), ICaffeParser::CaffeParserImpl::ParsePoolingLayer(), ICaffeParser::CaffeParserImpl::ParseReluLayer(), ICaffeParser::CaffeParserImpl::ParseScaleLayer(), ICaffeParser::CaffeParserImpl::ParseSoftmaxLayer(), and ICaffeParser::CaffeParserImpl::ParseSplitLayer().
|
staticprotected |
Definition at line 332 of file CaffeParser.cpp.
References CHECK_LOCATION.
Referenced by ICaffeParser::CaffeParserImpl::GetNetworkInputBindingInfo(), and ICaffeParser::CaffeParserImpl::GetNetworkOutputBindingInfo().
|
protected |
Find the Caffe layers listed as inputs (bottoms) for a given layer.
Definition at line 374 of file CaffeParser.cpp.
References CHECK_LOCATION, and ICaffeParser::CaffeParserImpl::m_CaffeLayersByTopName.
Referenced by ICaffeParser::CaffeParserImpl::LoadNetParam().
BindingPointInfo GetNetworkInputBindingInfo | ( | const std::string & | name | ) | const |
Retrieves binding info (layer id and tensor info) for the network input identified by the given layer name.
Definition at line 322 of file CaffeParser.cpp.
References ICaffeParser::CaffeParserImpl::GetBindingInfo(), and ICaffeParser::CaffeParserImpl::m_NetworkInputsBindingInfo.
BindingPointInfo GetNetworkOutputBindingInfo | ( | const std::string & | name | ) | const |
Retrieves binding info (layer id and tensor info) for the network output identified by the given layer name.
Definition at line 327 of file CaffeParser.cpp.
References ICaffeParser::CaffeParserImpl::GetBindingInfo(), and ICaffeParser::CaffeParserImpl::m_NetworkOutputsBindingInfo.
|
static |
Retrieve version in X.Y.Z form.
Definition at line 2256 of file CaffeParser.cpp.
References CAFFE_PARSER_VERSION.
|
protected |
does the actual conversion from caffe::NetParameter to armnn::INetwork
Definition at line 2043 of file CaffeParser.cpp.
References CHECK_LOCATION, IOutputSlot::Connect(), ICaffeParser::CaffeParserImpl::GetArmnnOutputSlotForCaffeTop(), ICaffeParser::CaffeParserImpl::GetInputs(), ICaffeParser::CaffeParserImpl::m_CaffeLayersByTopName, ICaffeParser::CaffeParserImpl::m_Network, ICaffeParser::CaffeParserImpl::m_NetworkOutputsBindingInfo, ICaffeParser::CaffeParserImpl::m_RequestedOutputs, ICaffeParser::CaffeParserImpl::ms_CaffeLayerNameToParsingFunctions, armnn::numeric_cast(), ICaffeParser::CaffeParserImpl::ResolveInPlaceLayers(), and ICaffeParser::CaffeParserImpl::TrackOutputBinding().
Referenced by ICaffeParser::CaffeParserImpl::CreateNetworkFromNetParameter().
|
protected |
Definition at line 1382 of file CaffeParser.cpp.
References CHECK_LOCATION, Connect(), ICaffeParser::CaffeParserImpl::GetArmnnOutputSlotForCaffeTop(), IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), armnnUtils::GetTensorInfo(), ArgMinMaxDescriptor::m_Axis, ArgMinMaxDescriptor::m_Function, ICaffeParser::CaffeParserImpl::m_Network, ArgMinMaxDescriptor::m_Output_Type, armnn::Max, ICaffeParser::CaffeParserImpl::SetArmnnOutputSlotForCaffeTop(), IOutputSlot::SetTensorInfo(), armnn::Signed32, and armnnCaffeParser::TensorDescToBlobShape().
|
protected |
Definition at line 1767 of file CaffeParser.cpp.
References CHECK_LOCATION, Connect(), armnn::Float32, ICaffeParser::CaffeParserImpl::GetArmnnOutputSlotForCaffeTop(), IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), TensorInfo::GetShape(), armnnUtils::GetTensorInfo(), BatchNormalizationDescriptor::m_Eps, ICaffeParser::CaffeParserImpl::m_Network, ICaffeParser::CaffeParserImpl::SetArmnnOutputSlotForCaffeTop(), and IOutputSlot::SetTensorInfo().
|
protected |
Definition at line 1708 of file CaffeParser.cpp.
References CHECK_LOCATION, IOutputSlot::Connect(), ICaffeParser::CaffeParserImpl::GetArmnnOutputSlotForCaffeTop(), IConnectableLayer::GetInputSlot(), TensorInfo::GetNumDimensions(), IConnectableLayer::GetOutputSlot(), TensorInfo::GetShape(), armnnUtils::GetTensorInfo(), ICaffeParser::CaffeParserImpl::m_Network, ICaffeParser::CaffeParserImpl::SetArmnnOutputSlotForCaffeTop(), IOutputSlot::SetTensorInfo(), and OriginsDescriptor::SetViewOriginCoord().
|
protected |
Definition at line 915 of file CaffeParser.cpp.
References ICaffeParser::CaffeParserImpl::AddConvLayerWithDepthwiseConv(), ICaffeParser::CaffeParserImpl::AddConvLayerWithSplits(), ARMNN_ASSERT, ICaffeParser::CaffeParserImpl::BlobShapeToTensorInfo(), CHECK_LOCATION, IOutputSlot::Connect(), GET_OPTIONAL_WITH_VECTOR_FALLBACK, ICaffeParser::CaffeParserImpl::GetArmnnOutputSlotForCaffeTop(), armnnUtils::GetTensorInfo(), Convolution2dDescriptor::m_BiasEnabled, Convolution2dDescriptor::m_DilationX, Convolution2dDescriptor::m_DilationY, ICaffeParser::CaffeParserImpl::m_Network, Convolution2dDescriptor::m_PadBottom, Convolution2dDescriptor::m_PadLeft, Convolution2dDescriptor::m_PadRight, Convolution2dDescriptor::m_PadTop, Convolution2dDescriptor::m_StrideX, Convolution2dDescriptor::m_StrideY, ICaffeParser::CaffeParserImpl::SetArmnnOutputSlotForCaffeTop(), and armnnCaffeParser::TensorDescToBlobShape().
|
protected |
Definition at line 1094 of file CaffeParser.cpp.
References ICaffeParser::CaffeParserImpl::AddDeconvLayerWithSplits(), ARMNN_ASSERT, ICaffeParser::CaffeParserImpl::BlobShapeToTensorInfo(), CHECK_LOCATION, IOutputSlot::Connect(), GET_OPTIONAL_WITH_VECTOR_FALLBACK, ICaffeParser::CaffeParserImpl::GetArmnnOutputSlotForCaffeTop(), armnnUtils::GetTensorInfo(), ICaffeParser::CaffeParserImpl::m_Network, TransposeConvolution2dDescriptor::m_PadLeft, ICaffeParser::CaffeParserImpl::SetArmnnOutputSlotForCaffeTop(), and armnnCaffeParser::TensorDescToBlobShape().
|
protected |
Definition at line 1900 of file CaffeParser.cpp.
References CHECK_LOCATION, ICaffeParser::CaffeParserImpl::GetArmnnOutputSlotForCaffeTop(), and ICaffeParser::CaffeParserImpl::SetArmnnOutputSlotForCaffeTop().
|
protected |
Definition at line 1663 of file CaffeParser.cpp.
References CHECK_LOCATION, Connect(), ICaffeParser::CaffeParserImpl::GetArmnnOutputSlotForCaffeTop(), IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), armnnUtils::GetTensorInfo(), ICaffeParser::CaffeParserImpl::m_Network, ICaffeParser::CaffeParserImpl::SetArmnnOutputSlotForCaffeTop(), and IOutputSlot::SetTensorInfo().
|
protected |
Definition at line 1567 of file CaffeParser.cpp.
References Connect(), ICaffeParser::CaffeParserImpl::GetArmnnOutputSlotForCaffeTop(), IConnectableLayer::GetInputSlot(), TensorInfo::GetNumDimensions(), IConnectableLayer::GetOutputSlot(), TensorInfo::GetShape(), armnnUtils::GetTensorInfo(), FullyConnectedDescriptor::m_BiasEnabled, ICaffeParser::CaffeParserImpl::m_Network, FullyConnectedDescriptor::m_TransposeWeightMatrix, ICaffeParser::CaffeParserImpl::SetArmnnOutputSlotForCaffeTop(), and IOutputSlot::SetTensorInfo().
|
protected |
Adds an armnn layer to m_Network given a Caffe LayerParameter of the correct type and is responsible for recording any newly created IOutputSlots using SetArmnnOutputSlotForCaffeTop().
Definition at line 397 of file CaffeParser.cpp.
References ARMNN_ASSERT, ICaffeParser::CaffeParserImpl::BlobShapeToTensorInfo(), CHECK_LOCATION, ICaffeParser::CaffeParserImpl::m_InputShapes, ICaffeParser::CaffeParserImpl::m_Network, ICaffeParser::CaffeParserImpl::m_NetworkInputsBindingInfo, armnn::numeric_cast(), ICaffeParser::CaffeParserImpl::SetArmnnOutputSlotForCaffeTop(), TensorInfo::SetShape(), and ICaffeParser::CaffeParserImpl::TrackInputBinding().
|
protected |
Definition at line 1468 of file CaffeParser.cpp.
References CHECK_LOCATION, Connect(), ICaffeParser::CaffeParserImpl::GetArmnnOutputSlotForCaffeTop(), IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), armnnUtils::GetTensorInfo(), NormalizationDescriptor::m_Alpha, NormalizationDescriptor::m_Beta, NormalizationDescriptor::m_K, ICaffeParser::CaffeParserImpl::m_Network, NormalizationDescriptor::m_NormChannelType, NormalizationDescriptor::m_NormMethodType, NormalizationDescriptor::m_NormSize, armnn::numeric_cast(), ICaffeParser::CaffeParserImpl::SetArmnnOutputSlotForCaffeTop(), and IOutputSlot::SetTensorInfo().
|
protected |
Definition at line 1270 of file CaffeParser.cpp.
References CHECK_LOCATION, Connect(), GET_OPTIONAL_WITH_FALLBACK, ICaffeParser::CaffeParserImpl::GetArmnnOutputSlotForCaffeTop(), IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), TensorInfo::GetShape(), armnnUtils::GetTensorInfo(), ICaffeParser::CaffeParserImpl::m_Network, 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, ICaffeParser::CaffeParserImpl::SetArmnnOutputSlotForCaffeTop(), and IOutputSlot::SetTensorInfo().
|
protected |
Definition at line 1442 of file CaffeParser.cpp.
References Connect(), ICaffeParser::CaffeParserImpl::GetArmnnOutputSlotForCaffeTop(), IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), armnnUtils::GetTensorInfo(), ActivationDescriptor::m_A, ActivationDescriptor::m_Function, ICaffeParser::CaffeParserImpl::m_Network, ICaffeParser::CaffeParserImpl::SetArmnnOutputSlotForCaffeTop(), and IOutputSlot::SetTensorInfo().
|
protected |
Definition at line 1831 of file CaffeParser.cpp.
References CHECK_LOCATION, Connect(), armnn::Float32, ICaffeParser::CaffeParserImpl::GetArmnnOutputSlotForCaffeTop(), IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), TensorInfo::GetShape(), armnnUtils::GetTensorInfo(), BatchNormalizationDescriptor::m_Eps, ICaffeParser::CaffeParserImpl::m_Network, ICaffeParser::CaffeParserImpl::SetArmnnOutputSlotForCaffeTop(), and IOutputSlot::SetTensorInfo().
|
protected |
Definition at line 1641 of file CaffeParser.cpp.
References Connect(), ICaffeParser::CaffeParserImpl::GetArmnnOutputSlotForCaffeTop(), IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), armnnUtils::GetTensorInfo(), SoftmaxDescriptor::m_Axis, ICaffeParser::CaffeParserImpl::m_Network, ICaffeParser::CaffeParserImpl::SetArmnnOutputSlotForCaffeTop(), and IOutputSlot::SetTensorInfo().
|
protected |
Definition at line 1881 of file CaffeParser.cpp.
References CHECK_LOCATION, ICaffeParser::CaffeParserImpl::GetArmnnOutputSlotForCaffeTop(), and ICaffeParser::CaffeParserImpl::SetArmnnOutputSlotForCaffeTop().
|
protected |
Modifies the Caffe network to replace "in-place" layers (whose top() and bottom() are both the same) with regular layers.
This simplifies further parsing.
Definition at line 1987 of file CaffeParser.cpp.
References CHECK_LOCATION.
Referenced by RecordByRecordCaffeParser::CreateNetworkFromBinaryFile(), and ICaffeParser::CaffeParserImpl::LoadNetParam().
|
protected |
Definition at line 1968 of file CaffeParser.cpp.
References CHECK_LOCATION, and ICaffeParser::CaffeParserImpl::m_ArmnnOutputSlotForCaffeTop.
Referenced by ICaffeParser::CaffeParserImpl::AddConvLayerWithDepthwiseConv(), ICaffeParser::CaffeParserImpl::AddConvLayerWithSplits(), ICaffeParser::CaffeParserImpl::AddDeconvLayerWithSplits(), ICaffeParser::CaffeParserImpl::ParseArgmaxLayer(), ICaffeParser::CaffeParserImpl::ParseBatchNormLayer(), ICaffeParser::CaffeParserImpl::ParseConcatLayer(), ICaffeParser::CaffeParserImpl::ParseConvLayer(), ICaffeParser::CaffeParserImpl::ParseDeconvLayer(), ICaffeParser::CaffeParserImpl::ParseDropoutLayer(), ICaffeParser::CaffeParserImpl::ParseEltwiseLayer(), ICaffeParser::CaffeParserImpl::ParseInnerProductLayer(), ICaffeParser::CaffeParserImpl::ParseInputLayer(), ICaffeParser::CaffeParserImpl::ParseLRNLayer(), ICaffeParser::CaffeParserImpl::ParsePoolingLayer(), ICaffeParser::CaffeParserImpl::ParseReluLayer(), ICaffeParser::CaffeParserImpl::ParseScaleLayer(), ICaffeParser::CaffeParserImpl::ParseSoftmaxLayer(), and ICaffeParser::CaffeParserImpl::ParseSplitLayer().
|
staticprotected |
Definition at line 1930 of file CaffeParser.cpp.
References CHECK_LOCATION, and IConnectableLayer::GetName().
Referenced by ICaffeParser::CaffeParserImpl::TrackInputBinding(), and ICaffeParser::CaffeParserImpl::TrackOutputBinding().
|
protected |
Definition at line 1916 of file CaffeParser.cpp.
References IConnectableLayer::GetName(), ICaffeParser::CaffeParserImpl::m_NetworkInputsBindingInfo, and ICaffeParser::CaffeParserImpl::TrackBindingPoint().
Referenced by ICaffeParser::CaffeParserImpl::ParseInputLayer().
|
protected |
Definition at line 1923 of file CaffeParser.cpp.
References IConnectableLayer::GetName(), ICaffeParser::CaffeParserImpl::m_NetworkOutputsBindingInfo, and ICaffeParser::CaffeParserImpl::TrackBindingPoint().
Referenced by RecordByRecordCaffeParser::CreateNetworkFromBinaryFile(), and ICaffeParser::CaffeParserImpl::LoadNetParam().
|
protected |
As we add armnn layers we store the armnn IOutputSlot which corresponds to the Caffe tops.
Definition at line 147 of file CaffeParser.hpp.
Referenced by ICaffeParser::CaffeParserImpl::Cleanup(), ICaffeParser::CaffeParserImpl::GetArmnnOutputSlotForCaffeTop(), and ICaffeParser::CaffeParserImpl::SetArmnnOutputSlotForCaffeTop().
|
protected |
Definition at line 155 of file CaffeParser.hpp.
Referenced by ICaffeParser::CaffeParserImpl::Cleanup(), ICaffeParser::CaffeParserImpl::GetInputs(), and ICaffeParser::CaffeParserImpl::LoadNetParam().
|
protected |
|
protected |
Definition at line 142 of file CaffeParser.hpp.
Referenced by ICaffeParser::CaffeParserImpl::AddConvLayerWithDepthwiseConv(), ICaffeParser::CaffeParserImpl::AddConvLayerWithSplits(), ICaffeParser::CaffeParserImpl::AddDeconvLayerWithSplits(), RecordByRecordCaffeParser::CreateNetworkFromBinaryFile(), ICaffeParser::CaffeParserImpl::CreateNetworkFromNetParameter(), ICaffeParser::CaffeParserImpl::LoadNetParam(), ICaffeParser::CaffeParserImpl::ParseArgmaxLayer(), ICaffeParser::CaffeParserImpl::ParseBatchNormLayer(), ICaffeParser::CaffeParserImpl::ParseConcatLayer(), ICaffeParser::CaffeParserImpl::ParseConvLayer(), ICaffeParser::CaffeParserImpl::ParseDeconvLayer(), ICaffeParser::CaffeParserImpl::ParseEltwiseLayer(), ICaffeParser::CaffeParserImpl::ParseInnerProductLayer(), ICaffeParser::CaffeParserImpl::ParseInputLayer(), ICaffeParser::CaffeParserImpl::ParseLRNLayer(), ICaffeParser::CaffeParserImpl::ParsePoolingLayer(), ICaffeParser::CaffeParserImpl::ParseReluLayer(), ICaffeParser::CaffeParserImpl::ParseScaleLayer(), and ICaffeParser::CaffeParserImpl::ParseSoftmaxLayer().
|
protected |
maps input layer names to their corresponding ids and tensor infos
Definition at line 137 of file CaffeParser.hpp.
Referenced by RecordByRecordCaffeParser::CreateNetworkFromBinaryFile(), ICaffeParser::CaffeParserImpl::CreateNetworkFromNetParameter(), ICaffeParser::CaffeParserImpl::GetNetworkInputBindingInfo(), ICaffeParser::CaffeParserImpl::ParseInputLayer(), and ICaffeParser::CaffeParserImpl::TrackInputBinding().
|
protected |
maps output layer names to their corresponding ids and tensor infos
Definition at line 140 of file CaffeParser.hpp.
Referenced by RecordByRecordCaffeParser::CreateNetworkFromBinaryFile(), ICaffeParser::CaffeParserImpl::CreateNetworkFromNetParameter(), ICaffeParser::CaffeParserImpl::GetNetworkOutputBindingInfo(), ICaffeParser::CaffeParserImpl::LoadNetParam(), and ICaffeParser::CaffeParserImpl::TrackOutputBinding().
|
protected |
Definition at line 149 of file CaffeParser.hpp.
Referenced by ICaffeParser::CaffeParserImpl::Cleanup(), ICaffeParser::CaffeParserImpl::CreateNetworkFromNetParameter(), and ICaffeParser::CaffeParserImpl::LoadNetParam().
|
staticprotected |
Maps Caffe layer names to parsing member functions.
Definition at line 134 of file CaffeParser.hpp.
Referenced by RecordByRecordCaffeParser::CreateNetworkFromBinaryFile(), and ICaffeParser::CaffeParserImpl::LoadNetParam().