ArmNN
NotReleased
|
#include <RecordByRecordCaffeParser.hpp>
Public Member Functions | |
virtual armnn::INetworkPtr | CreateNetworkFromBinaryFile (const char *graphFile, const std::map< std::string, armnn::TensorShape > &inputShapes, const std::vector< std::string > &requestedOutputs) override |
Create the network from a protobuf binary file on disk. More... | |
RecordByRecordCaffeParser () | |
Public Member Functions inherited from CaffeParserBase | |
virtual armnn::INetworkPtr | CreateNetworkFromTextFile (const char *graphFile, const std::map< std::string, armnn::TensorShape > &inputShapes, const std::vector< std::string > &requestedOutputs) override |
Create the network from a protobuf text file on disk. More... | |
virtual armnn::INetworkPtr | CreateNetworkFromString (const char *protoText, const std::map< std::string, armnn::TensorShape > &inputShapes, const std::vector< std::string > &requestedOutputs) override |
Creates the network directly from protobuf text in a string. Useful for debugging/testing. More... | |
virtual BindingPointInfo | GetNetworkInputBindingInfo (const std::string &name) const override |
Retrieves binding info (layer id and tensor info) for the network input identified by the given layer name. More... | |
virtual BindingPointInfo | GetNetworkOutputBindingInfo (const std::string &name) const override |
Retrieves binding info (layer id and tensor info) for the network output identified by the given layer name. More... | |
CaffeParserBase () | |
Additional Inherited Members | |
Static Public Member Functions inherited from ICaffeParser | |
static ICaffeParser * | CreateRaw () |
static ICaffeParserPtr | Create () |
static void | Destroy (ICaffeParser *parser) |
Protected Types inherited from CaffeParserBase | |
using | OperationParsingFunction = void(CaffeParserBase::*)(const caffe::LayerParameter &layerParam) |
Protected Member Functions inherited from CaffeParserBase | |
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 |
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) |
void | ParseInputLayer (const caffe::LayerParameter &layerParam) |
void | ParseConvLayer (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 | AddConvLayerWithSplits (const caffe::LayerParameter &layerParam, const armnn::Convolution2dDescriptor &desc, unsigned int kernelW, unsigned int kernelH) |
void | AddConvLayerWithDepthwiseConv (const caffe::LayerParameter &layerParam, const armnn::Convolution2dDescriptor &desc, unsigned int kernelW, unsigned int kernelH) |
Protected Member Functions inherited from ICaffeParser | |
virtual | ~ICaffeParser () |
Static Protected Member Functions inherited from CaffeParserBase | |
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 inherited from CaffeParserBase | |
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 inherited from CaffeParserBase | |
static const std::map< std::string, OperationParsingFunction > | ms_CaffeLayerNameToParsingFunctions |
Maps Caffe layer names to parsing member functions. More... | |
Definition at line 25 of file RecordByRecordCaffeParser.hpp.
Definition at line 461 of file RecordByRecordCaffeParser.cpp.
|
overridevirtual |
Create the network from a protobuf binary file on disk.
Implements ICaffeParser.
Definition at line 464 of file RecordByRecordCaffeParser.cpp.
References CaffeParserBase::Cleanup(), IOutputSlot::Connect(), INetwork::Create(), CaffeParserBase::GetArmnnOutputSlotForCaffeTop(), armnn::info, CaffeParserBase::m_InputShapes, CaffeParserBase::m_Network, CaffeParserBase::m_NetworkInputsBindingInfo, CaffeParserBase::m_NetworkOutputsBindingInfo, CaffeParserBase::ms_CaffeLayerNameToParsingFunctions, CaffeParserBase::ResolveInPlaceLayers(), and CaffeParserBase::TrackOutputBinding().