14 #include <unordered_map> 34 const char* graphFile,
35 const std::map<std::string, armnn::TensorShape>& inputShapes,
36 const std::vector<std::string>& requestedOutputs)
override;
41 const char* protoText,
42 const std::map<std::string, armnn::TensorShape>& inputShapes,
43 const std::vector<std::string>& requestedOutputs)
override;
46 virtual BindingPointInfo GetNetworkInputBindingInfo(
const std::string& name)
const override;
49 virtual BindingPointInfo GetNetworkOutputBindingInfo(
const std::string& name)
const override;
57 void ParseInputLayer(
const caffe::LayerParameter& layerParam);
58 void ParseConvLayer(
const caffe::LayerParameter& layerParam);
59 void ParsePoolingLayer(
const caffe::LayerParameter& layerParam);
60 void ParseReluLayer(
const caffe::LayerParameter& layerParam);
61 void ParseLRNLayer(
const caffe::LayerParameter& layerParam);
62 void ParseInnerProductLayer(
const caffe::LayerParameter& layerParam);
63 void ParseSoftmaxLayer(
const caffe::LayerParameter& layerParam);
64 void ParseEltwiseLayer(
const caffe::LayerParameter& layerParam);
65 void ParseConcatLayer(
const caffe::LayerParameter& layerParam);
66 void ParseBatchNormLayer(
const caffe::LayerParameter& layerParam);
67 void ParseScaleLayer(
const caffe::LayerParameter& layerParam);
68 void ParseSplitLayer(
const caffe::LayerParameter& layerParam);
69 void ParseDropoutLayer(
const caffe::LayerParameter& layerParam);
74 void AddConvLayerWithSplits(
const caffe::LayerParameter& layerParam,
77 unsigned int kernelH);
78 void AddConvLayerWithDepthwiseConv(
const caffe::LayerParameter& layerParam,
81 unsigned int kernelH);
93 const char* bindingPointDesc,
94 std::unordered_map<std::string, BindingPointInfo>& nameToBindingInfo);
101 void SetArmnnOutputSlotForCaffeTop(
const std::string& caffeTopName,
armnn::IOutputSlot& armnnOutputSlot);
105 armnn::IOutputSlot& GetArmnnOutputSlotForCaffeTop(
const std::string& caffeTopName)
const;
107 static std::pair<armnn::LayerBindingId, armnn::TensorInfo> GetBindingInfo(
108 const std::string& layerName,
109 const char* bindingPointDesc,
110 const std::unordered_map<std::string, BindingPointInfo>& bindingInfos);
143 caffe::NetParameter& netParam,
144 const std::map<std::string, armnn::TensorShape>& inputShapes,
145 const std::vector<std::string>& requestedOutputs);
148 void LoadNetParam(caffe::NetParameter& netParameter);
151 std::vector<const caffe::LayerParameter*> GetInputs(
const caffe::LayerParameter& layerParam);
155 void ResolveInPlaceLayers(caffe::NetParameter& netParameter);
165 const char* graphFile,
166 const std::map<std::string, armnn::TensorShape>& inputShapes,
167 const std::vector<std::string>& requestedOutputs)
override;
void(CaffeParserBase::*)(const caffe::LayerParameter &layerParam) OperationParsingFunction
std::pair< armnn::LayerBindingId, armnn::TensorInfo > BindingPointInfo
std::vector< std::string > m_RequestedOutputs
std::unordered_map< std::string, BindingPointInfo > m_NetworkOutputsBindingInfo
maps output layer names to their corresponding ids and tensor infos
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
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...
armnn::INetworkPtr m_Network
An output connection slot for a layer. The output slot may be connected to 1 or more input slots of s...
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
std::unordered_map< std::string, BindingPointInfo > m_NetworkInputsBindingInfo
maps input layer names to their corresponding ids and tensor infos
A Convolution2dDescriptor for the Convolution2dLayer.
std::map< std::string, const caffe::LayerParameter * > m_CaffeLayersByTopName
int LayerBindingId
Type of identifiers for bindable layers (inputs, outputs).
std::map< std::string, armnn::TensorShape > m_InputShapes
static const std::map< std::string, OperationParsingFunction > ms_CaffeLayerNameToParsingFunctions
Maps Caffe layer names to parsing member functions.