namespace armnnDeserializer
{
+IDeserializer::IDeserializer() : pDeserializerImpl(new DeserializerImpl()){}
+
+IDeserializer::~IDeserializer() = default;
+
+IDeserializer *IDeserializer::CreateRaw()
+{
+ return new IDeserializer();
+}
+
+IDeserializerPtr IDeserializer::Create()
+{
+ return IDeserializerPtr(CreateRaw(), &IDeserializer::Destroy);
+}
+
+void IDeserializer::Destroy(IDeserializer *parser)
+{
+ delete parser;
+}
+
+armnn::INetworkPtr IDeserializer::CreateNetworkFromBinary(const std::vector<uint8_t> &binaryContent)
+{
+ return pDeserializerImpl->CreateNetworkFromBinary(binaryContent);
+}
+
+armnn::INetworkPtr IDeserializer::CreateNetworkFromBinary(std::istream &binaryContent)
+{
+ return pDeserializerImpl->CreateNetworkFromBinary(binaryContent);
+}
+
+BindingPointInfo IDeserializer::GetNetworkInputBindingInfo(unsigned int layerId, const std::string &name) const
+{
+ return pDeserializerImpl->GetNetworkInputBindingInfo(layerId, name);
+}
+
+BindingPointInfo IDeserializer::GetNetworkOutputBindingInfo(unsigned int layerId, const std::string &name) const
+{
+ return pDeserializerImpl->GetNetworkOutputBindingInfo(layerId, name);
+}
+
namespace
{
const uint32_t VIRTUAL_LAYER_ID = std::numeric_limits<uint32_t>::max();
- void CheckGraph(const Deserializer::GraphPtr& graph,
+ void CheckGraph(const GraphPtr& graph,
unsigned int layersIndex,
const CheckLocation& location)
{
}
}
-void CheckLayers(const Deserializer::GraphPtr& graph,
+void CheckLayers(const GraphPtr& graph,
unsigned int layersIndex,
unsigned int layerIndex,
const CheckLocation& location)
}
}
-void CheckTensorPtr(Deserializer::TensorRawPtr rawPtr,
+void CheckTensorPtr(TensorRawPtr rawPtr,
const CheckLocation& location)
{
if (rawPtr == nullptr)
}
}
-void CheckConstTensorPtr(Deserializer::ConstTensorRawPtr rawPtr,
+void CheckConstTensorPtr(ConstTensorRawPtr rawPtr,
const CheckLocation& location)
{
if (rawPtr == nullptr)
return true;
}
-Deserializer::Deserializer()
+IDeserializer::DeserializerImpl::DeserializerImpl()
: m_Network(nullptr, nullptr),
//May require LayerType_Max to be included
-m_ParserFunctions(Layer_MAX+1, &Deserializer::ParseUnsupportedLayer)
+m_ParserFunctions(Layer_MAX+1, &IDeserializer::DeserializerImpl::ParseUnsupportedLayer)
{
// register supported layers
- m_ParserFunctions[Layer_AbsLayer] = &Deserializer::ParseAbs;
- m_ParserFunctions[Layer_ActivationLayer] = &Deserializer::ParseActivation;
- m_ParserFunctions[Layer_AdditionLayer] = &Deserializer::ParseAdd;
- m_ParserFunctions[Layer_ArgMinMaxLayer] = &Deserializer::ParseArgMinMax;
- m_ParserFunctions[Layer_BatchToSpaceNdLayer] = &Deserializer::ParseBatchToSpaceNd;
- m_ParserFunctions[Layer_BatchNormalizationLayer] = &Deserializer::ParseBatchNormalization;
- m_ParserFunctions[Layer_ComparisonLayer] = &Deserializer::ParseComparison;
- m_ParserFunctions[Layer_ConcatLayer] = &Deserializer::ParseConcat;
- m_ParserFunctions[Layer_ConstantLayer] = &Deserializer::ParseConstant;
- m_ParserFunctions[Layer_Convolution2dLayer] = &Deserializer::ParseConvolution2d;
- m_ParserFunctions[Layer_DepthToSpaceLayer] = &Deserializer::ParseDepthToSpace;
- m_ParserFunctions[Layer_DepthwiseConvolution2dLayer] = &Deserializer::ParseDepthwiseConvolution2d;
- m_ParserFunctions[Layer_DequantizeLayer] = &Deserializer::ParseDequantize;
- m_ParserFunctions[Layer_DetectionPostProcessLayer] = &Deserializer::ParseDetectionPostProcess;
- m_ParserFunctions[Layer_DivisionLayer] = &Deserializer::ParseDivision;
- m_ParserFunctions[Layer_ElementwiseUnaryLayer] = &Deserializer::ParseElementwiseUnary;
- m_ParserFunctions[Layer_EqualLayer] = &Deserializer::ParseEqual;
- m_ParserFunctions[Layer_FullyConnectedLayer] = &Deserializer::ParseFullyConnected;
- m_ParserFunctions[Layer_FillLayer] = &Deserializer::ParseFill;
- m_ParserFunctions[Layer_FloorLayer] = &Deserializer::ParseFloor;
- m_ParserFunctions[Layer_GatherLayer] = &Deserializer::ParseGather;
- m_ParserFunctions[Layer_GreaterLayer] = &Deserializer::ParseGreater;
- m_ParserFunctions[Layer_InstanceNormalizationLayer] = &Deserializer::ParseInstanceNormalization;
- m_ParserFunctions[Layer_L2NormalizationLayer] = &Deserializer::ParseL2Normalization;
- m_ParserFunctions[Layer_LogicalBinaryLayer] = &Deserializer::ParseLogicalBinary;
- m_ParserFunctions[Layer_LogSoftmaxLayer] = &Deserializer::ParseLogSoftmax;
- m_ParserFunctions[Layer_LstmLayer] = &Deserializer::ParseLstm;
- m_ParserFunctions[Layer_MaximumLayer] = &Deserializer::ParseMaximum;
- m_ParserFunctions[Layer_MeanLayer] = &Deserializer::ParseMean;
- m_ParserFunctions[Layer_MinimumLayer] = &Deserializer::ParseMinimum;
- m_ParserFunctions[Layer_MergeLayer] = &Deserializer::ParseMerge;
- m_ParserFunctions[Layer_MergerLayer] = &Deserializer::ParseConcat;
- m_ParserFunctions[Layer_MultiplicationLayer] = &Deserializer::ParseMultiplication;
- m_ParserFunctions[Layer_NormalizationLayer] = &Deserializer::ParseNormalization;
- m_ParserFunctions[Layer_PadLayer] = &Deserializer::ParsePad;
- m_ParserFunctions[Layer_PermuteLayer] = &Deserializer::ParsePermute;
- m_ParserFunctions[Layer_Pooling2dLayer] = &Deserializer::ParsePooling2d;
- m_ParserFunctions[Layer_PreluLayer] = &Deserializer::ParsePrelu;
- m_ParserFunctions[Layer_QLstmLayer] = &Deserializer::ParseQLstm;
- m_ParserFunctions[Layer_QuantizeLayer] = &Deserializer::ParseQuantize;
- m_ParserFunctions[Layer_QuantizedLstmLayer] = &Deserializer::ParseQuantizedLstm;
- m_ParserFunctions[Layer_RankLayer] = &Deserializer::ParseRank;
- m_ParserFunctions[Layer_ReshapeLayer] = &Deserializer::ParseReshape;
- m_ParserFunctions[Layer_ResizeBilinearLayer] = &Deserializer::ParseResizeBilinear;
- m_ParserFunctions[Layer_ResizeLayer] = &Deserializer::ParseResize;
- m_ParserFunctions[Layer_RsqrtLayer] = &Deserializer::ParseRsqrt;
- m_ParserFunctions[Layer_SliceLayer] = &Deserializer::ParseSlice;
- m_ParserFunctions[Layer_SoftmaxLayer] = &Deserializer::ParseSoftmax;
- m_ParserFunctions[Layer_SpaceToBatchNdLayer] = &Deserializer::ParseSpaceToBatchNd;
- m_ParserFunctions[Layer_SpaceToDepthLayer] = &Deserializer::ParseSpaceToDepth;
- m_ParserFunctions[Layer_SplitterLayer] = &Deserializer::ParseSplitter;
- m_ParserFunctions[Layer_StackLayer] = &Deserializer::ParseStack;
- m_ParserFunctions[Layer_StandInLayer] = &Deserializer::ParseStandIn;
- m_ParserFunctions[Layer_StridedSliceLayer] = &Deserializer::ParseStridedSlice;
- m_ParserFunctions[Layer_SubtractionLayer] = &Deserializer::ParseSubtraction;
- m_ParserFunctions[Layer_SwitchLayer] = &Deserializer::ParseSwitch;
- m_ParserFunctions[Layer_TransposeConvolution2dLayer] = &Deserializer::ParseTransposeConvolution2d;
- m_ParserFunctions[Layer_TransposeLayer] = &Deserializer::ParseTranspose;
-}
-
-Deserializer::LayerBaseRawPtr Deserializer::GetBaseLayer(const GraphPtr& graphPtr, unsigned int layerIndex)
+ m_ParserFunctions[Layer_AbsLayer] = &DeserializerImpl::ParseAbs;
+ m_ParserFunctions[Layer_ActivationLayer] = &DeserializerImpl::ParseActivation;
+ m_ParserFunctions[Layer_AdditionLayer] = &DeserializerImpl::ParseAdd;
+ m_ParserFunctions[Layer_ArgMinMaxLayer] = &DeserializerImpl::ParseArgMinMax;
+ m_ParserFunctions[Layer_BatchToSpaceNdLayer] = &DeserializerImpl::ParseBatchToSpaceNd;
+ m_ParserFunctions[Layer_BatchNormalizationLayer] = &DeserializerImpl::ParseBatchNormalization;
+ m_ParserFunctions[Layer_ComparisonLayer] = &DeserializerImpl::ParseComparison;
+ m_ParserFunctions[Layer_ConcatLayer] = &DeserializerImpl::ParseConcat;
+ m_ParserFunctions[Layer_ConstantLayer] = &DeserializerImpl::ParseConstant;
+ m_ParserFunctions[Layer_Convolution2dLayer] = &DeserializerImpl::ParseConvolution2d;
+ m_ParserFunctions[Layer_DepthToSpaceLayer] = &DeserializerImpl::ParseDepthToSpace;
+ m_ParserFunctions[Layer_DepthwiseConvolution2dLayer] = &DeserializerImpl::ParseDepthwiseConvolution2d;
+ m_ParserFunctions[Layer_DequantizeLayer] = &DeserializerImpl::ParseDequantize;
+ m_ParserFunctions[Layer_DetectionPostProcessLayer] = &DeserializerImpl::ParseDetectionPostProcess;
+ m_ParserFunctions[Layer_DivisionLayer] = &DeserializerImpl::ParseDivision;
+ m_ParserFunctions[Layer_ElementwiseUnaryLayer] = &DeserializerImpl::ParseElementwiseUnary;
+ m_ParserFunctions[Layer_EqualLayer] = &DeserializerImpl::ParseEqual;
+ m_ParserFunctions[Layer_FullyConnectedLayer] = &DeserializerImpl::ParseFullyConnected;
+ m_ParserFunctions[Layer_FillLayer] = &DeserializerImpl::ParseFill;
+ m_ParserFunctions[Layer_FloorLayer] = &DeserializerImpl::ParseFloor;
+ m_ParserFunctions[Layer_GatherLayer] = &DeserializerImpl::ParseGather;
+ m_ParserFunctions[Layer_GreaterLayer] = &DeserializerImpl::ParseGreater;
+ m_ParserFunctions[Layer_InstanceNormalizationLayer] = &DeserializerImpl::ParseInstanceNormalization;
+ m_ParserFunctions[Layer_L2NormalizationLayer] = &DeserializerImpl::ParseL2Normalization;
+ m_ParserFunctions[Layer_LogicalBinaryLayer] = &DeserializerImpl::ParseLogicalBinary;
+ m_ParserFunctions[Layer_LogSoftmaxLayer] = &DeserializerImpl::ParseLogSoftmax;
+ m_ParserFunctions[Layer_LstmLayer] = &DeserializerImpl::ParseLstm;
+ m_ParserFunctions[Layer_MaximumLayer] = &DeserializerImpl::ParseMaximum;
+ m_ParserFunctions[Layer_MeanLayer] = &DeserializerImpl::ParseMean;
+ m_ParserFunctions[Layer_MinimumLayer] = &DeserializerImpl::ParseMinimum;
+ m_ParserFunctions[Layer_MergeLayer] = &DeserializerImpl::ParseMerge;
+ m_ParserFunctions[Layer_MergerLayer] = &DeserializerImpl::ParseConcat;
+ m_ParserFunctions[Layer_MultiplicationLayer] = &DeserializerImpl::ParseMultiplication;
+ m_ParserFunctions[Layer_NormalizationLayer] = &DeserializerImpl::ParseNormalization;
+ m_ParserFunctions[Layer_PadLayer] = &DeserializerImpl::ParsePad;
+ m_ParserFunctions[Layer_PermuteLayer] = &DeserializerImpl::ParsePermute;
+ m_ParserFunctions[Layer_Pooling2dLayer] = &DeserializerImpl::ParsePooling2d;
+ m_ParserFunctions[Layer_PreluLayer] = &DeserializerImpl::ParsePrelu;
+ m_ParserFunctions[Layer_QLstmLayer] = &DeserializerImpl::ParseQLstm;
+ m_ParserFunctions[Layer_QuantizeLayer] = &DeserializerImpl::ParseQuantize;
+ m_ParserFunctions[Layer_QuantizedLstmLayer] = &DeserializerImpl::ParseQuantizedLstm;
+ m_ParserFunctions[Layer_RankLayer] = &DeserializerImpl::ParseRank;
+ m_ParserFunctions[Layer_ReshapeLayer] = &DeserializerImpl::ParseReshape;
+ m_ParserFunctions[Layer_ResizeBilinearLayer] = &DeserializerImpl::ParseResizeBilinear;
+ m_ParserFunctions[Layer_ResizeLayer] = &DeserializerImpl::ParseResize;
+ m_ParserFunctions[Layer_RsqrtLayer] = &DeserializerImpl::ParseRsqrt;
+ m_ParserFunctions[Layer_SliceLayer] = &DeserializerImpl::ParseSlice;
+ m_ParserFunctions[Layer_SoftmaxLayer] = &DeserializerImpl::ParseSoftmax;
+ m_ParserFunctions[Layer_SpaceToBatchNdLayer] = &DeserializerImpl::ParseSpaceToBatchNd;
+ m_ParserFunctions[Layer_SpaceToDepthLayer] = &DeserializerImpl::ParseSpaceToDepth;
+ m_ParserFunctions[Layer_SplitterLayer] = &DeserializerImpl::ParseSplitter;
+ m_ParserFunctions[Layer_StackLayer] = &DeserializerImpl::ParseStack;
+ m_ParserFunctions[Layer_StandInLayer] = &DeserializerImpl::ParseStandIn;
+ m_ParserFunctions[Layer_StridedSliceLayer] = &DeserializerImpl::ParseStridedSlice;
+ m_ParserFunctions[Layer_SubtractionLayer] = &DeserializerImpl::ParseSubtraction;
+ m_ParserFunctions[Layer_SwitchLayer] = &DeserializerImpl::ParseSwitch;
+ m_ParserFunctions[Layer_TransposeConvolution2dLayer] = &DeserializerImpl::ParseTransposeConvolution2d;
+ m_ParserFunctions[Layer_TransposeLayer] = &DeserializerImpl::ParseTranspose;
+}
+
+LayerBaseRawPtr IDeserializer::DeserializerImpl::GetBaseLayer(const GraphPtr& graphPtr, unsigned int layerIndex)
{
auto layerType = graphPtr->layers()->Get(layerIndex)->layer_type();
}
}
-std::string Deserializer::GetLayerName(const GraphPtr& graph, unsigned int index)
+std::string IDeserializer::DeserializerImpl::GetLayerName(const GraphPtr& graph, unsigned int index)
{
auto layer = GetBaseLayer(graph, index);
assert(layer);
return layer->layerName()->str();
}
-int32_t Deserializer::GetBindingLayerInfo(const GraphPtr& graphPtr, unsigned int layerIndex)
+int32_t IDeserializer::DeserializerImpl::GetBindingLayerInfo(const GraphPtr& graphPtr, unsigned int layerIndex)
{
auto layerType = graphPtr->layers()->Get(layerIndex)->layer_type();
}
}
-armnn::TensorInfo ToTensorInfo(Deserializer::TensorRawPtr tensorPtr)
+armnn::TensorInfo ToTensorInfo(TensorRawPtr tensorPtr)
{
armnn::DataType type;
CHECK_TENSOR_PTR(tensorPtr);
return result;
}
-armnn::ConstTensor ToConstTensor(Deserializer::ConstTensorRawPtr constTensorPtr)
+armnn::ConstTensor ToConstTensor(ConstTensorRawPtr constTensorPtr)
{
CHECK_CONST_TENSOR_PTR(constTensorPtr);
armnn::TensorInfo tensorInfo = ToTensorInfo(constTensorPtr->info());
}
}
-Deserializer::TensorRawPtrVector Deserializer::GetInputs(const GraphPtr& graphPtr,
- unsigned int layerIndex)
+TensorRawPtrVector IDeserializer::DeserializerImpl::GetInputs(const GraphPtr& graphPtr, unsigned int layerIndex)
{
CHECK_LAYERS(graphPtr, 0, layerIndex);
auto layer = GetBaseLayer(graphPtr, layerIndex);
return result;
}
-Deserializer::TensorRawPtrVector Deserializer::GetOutputs(const GraphPtr& graphPtr,
- unsigned int layerIndex)
+TensorRawPtrVector IDeserializer::DeserializerImpl::GetOutputs(const GraphPtr& graphPtr, unsigned int layerIndex)
{
CHECK_LAYERS(graphPtr, 0, layerIndex);
auto layer = GetBaseLayer(graphPtr, layerIndex);
return result;
}
-void Deserializer::ParseUnsupportedLayer(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseUnsupportedLayer(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
const auto layerName = GetBaseLayer(graph, layerIndex)->layerName()->c_str();
CHECK_LOCATION().AsString()));
}
-void Deserializer::ResetParser()
+void IDeserializer::DeserializerImpl::ResetParser()
{
m_Network = armnn::INetworkPtr(nullptr, nullptr);
m_InputBindings.clear();
m_OutputBindings.clear();
}
-IDeserializer* IDeserializer::CreateRaw()
-{
- return new Deserializer();
-}
-IDeserializerPtr IDeserializer::Create()
-{
- return IDeserializerPtr(CreateRaw(), &IDeserializer::Destroy);
-}
-
-void IDeserializer::Destroy(IDeserializer* parser)
-{
- delete parser;
-}
-
-INetworkPtr Deserializer::CreateNetworkFromBinary(const std::vector<uint8_t>& binaryContent)
+INetworkPtr IDeserializer::DeserializerImpl::CreateNetworkFromBinary(const std::vector<uint8_t>& binaryContent)
{
ResetParser();
GraphPtr graph = LoadGraphFromBinary(binaryContent.data(), binaryContent.size());
return CreateNetworkFromGraph(graph);
}
-armnn::INetworkPtr Deserializer::CreateNetworkFromBinary(std::istream& binaryContent)
+armnn::INetworkPtr IDeserializer::DeserializerImpl::CreateNetworkFromBinary(std::istream& binaryContent)
{
ResetParser();
std::vector<uint8_t> content((std::istreambuf_iterator<char>(binaryContent)), std::istreambuf_iterator<char>());
return CreateNetworkFromGraph(graph);
}
-Deserializer::GraphPtr Deserializer::LoadGraphFromBinary(const uint8_t* binaryContent, size_t len)
+GraphPtr IDeserializer::DeserializerImpl::LoadGraphFromBinary(const uint8_t* binaryContent, size_t len)
{
if (binaryContent == nullptr)
{
return GetSerializedGraph(binaryContent);
}
-INetworkPtr Deserializer::CreateNetworkFromGraph(GraphPtr graph)
+INetworkPtr IDeserializer::DeserializerImpl::CreateNetworkFromGraph(GraphPtr graph)
{
m_Network = INetwork::Create();
ARMNN_ASSERT(graph != nullptr);
return std::move(m_Network);
}
-BindingPointInfo Deserializer::GetNetworkInputBindingInfo(unsigned int layerIndex,
+BindingPointInfo IDeserializer::DeserializerImpl::GetNetworkInputBindingInfo(unsigned int layerIndex,
const std::string& name) const
{
IgnoreUnused(layerIndex);
CHECK_LOCATION().AsString()));
}
-BindingPointInfo Deserializer::GetNetworkOutputBindingInfo(unsigned int layerIndex,
+BindingPointInfo IDeserializer::DeserializerImpl::GetNetworkOutputBindingInfo(unsigned int layerIndex,
const std::string& name) const
{
IgnoreUnused(layerIndex);
CHECK_LOCATION().AsString()));
}
-unsigned int Deserializer::GetInputLayerInVector(GraphPtr graph, int targetId)
+unsigned int IDeserializer::DeserializerImpl::GetInputLayerInVector(GraphPtr graph, int targetId)
{
for (unsigned int i = 0; i < graph->layers()->size(); i++)
{
throw ParseException("Input layer with given layerBindingId not found");
}
-unsigned int Deserializer::GetOutputLayerInVector(GraphPtr graph, int targetId)
+unsigned int IDeserializer::DeserializerImpl::GetOutputLayerInVector(GraphPtr graph, int targetId)
{
for (unsigned int i = 0; i < graph->layers()->size(); i++)
{
throw ParseException("Output layer with given layerBindingId not found");
}
-unsigned int Deserializer::GetLayerIndexInVector(GraphPtr graph, unsigned int targetIndex)
+unsigned int IDeserializer::DeserializerImpl::GetLayerIndexInVector(GraphPtr graph, unsigned int targetIndex)
{
for (unsigned int i = 0; i < graph->layers()->size(); i++)
{
throw ParseException("Layer with given index not found");
}
-Deserializer::FeatureVersions Deserializer::GetFeatureVersions(GraphPtr graph)
+IDeserializer::DeserializerImpl::FeatureVersions IDeserializer::DeserializerImpl::GetFeatureVersions(GraphPtr graph)
{
- Deserializer::FeatureVersions versions;
+ IDeserializer::DeserializerImpl::FeatureVersions versions;
if (graph->featureVersions())
{
return versions;
}
-void Deserializer::SetupInputLayers(GraphPtr graph)
+void IDeserializer::DeserializerImpl::SetupInputLayers(GraphPtr graph)
{
CHECK_GRAPH(graph, 0);
const unsigned int numInputs = graph->inputIds()->size();
}
}
-void Deserializer::SetupOutputLayers(GraphPtr graph)
+void IDeserializer::DeserializerImpl::SetupOutputLayers(GraphPtr graph)
{
CHECK_GRAPH(graph, 0);
const unsigned int numOutputs = graph->outputIds()->size();
}
}
-void Deserializer::RegisterOutputSlots(GraphPtr graph,
+void IDeserializer::DeserializerImpl::RegisterOutputSlots(GraphPtr graph,
uint32_t layerIndex,
IConnectableLayer* layer)
{
}
}
-void Deserializer::RegisterInputSlots(GraphPtr graph,
+void IDeserializer::DeserializerImpl::RegisterInputSlots(GraphPtr graph,
uint32_t layerIndex,
armnn::IConnectableLayer* layer)
{
}
}
-void Deserializer::RegisterInputSlotOfConnection(uint32_t sourceLayerIndex,
+void IDeserializer::DeserializerImpl::RegisterInputSlotOfConnection(uint32_t sourceLayerIndex,
uint32_t outputSlotIndex,
armnn::IInputSlot* inputSlot)
{
}
}
-void Deserializer::RegisterOutputSlotOfConnection(uint32_t sourceLayerIndex,
+void IDeserializer::DeserializerImpl::RegisterOutputSlotOfConnection(uint32_t sourceLayerIndex,
uint32_t outputSlotIndex,
armnn::IOutputSlot* outputSlot)
{
connections.outputSlots[outputSlotIndex] = outputSlot;
}
-void Deserializer::ParseAbs(armnnDeserializer::Deserializer::GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseAbs(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
auto inputs = GetInputs(graph, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseActivation(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseActivation(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
auto inputs = GetInputs(graph, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseAdd(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseAdd(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
auto inputs = GetInputs(graph, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseArgMinMax(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseArgMinMax(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
auto inputs = GetInputs(graph, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseBatchToSpaceNd(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseBatchToSpaceNd(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
- Deserializer::TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
+ TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
CHECK_VALID_SIZE(inputs.size(), 1);
- Deserializer::TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
+ TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
CHECK_VALID_SIZE(outputs.size(), 1);
auto flatBufferDescriptor = graph->layers()->Get(layerIndex)->layer_as_BatchToSpaceNdLayer()->descriptor();
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseBatchNormalization(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseBatchNormalization(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseConstant(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseConstant(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
CHECK_LOCATION();
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseConvolution2d(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseConvolution2d(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
auto inputs = GetInputs(graph, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseDepthToSpace(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseDepthToSpace(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseDepthwiseConvolution2d(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseDepthwiseConvolution2d(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
auto inputs = GetInputs(graph, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseDetectionPostProcess(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseDetectionPostProcess(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
auto inputs = GetInputs(graph, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseDivision(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseDivision(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
auto inputs = GetInputs(graph, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseEqual(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseEqual(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
auto inputs = GetInputs(graph, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseFill(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseFill(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
auto inputs = GetInputs(graph, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseGreater(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseGreater(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
auto inputs = GetInputs(graph, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseInstanceNormalization(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseInstanceNormalization(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseL2Normalization(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseL2Normalization(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseLogicalBinary(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseLogicalBinary(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
CHECK_LOCATION();
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseLogSoftmax(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseLogSoftmax(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
- Deserializer::TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
+ TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
CHECK_VALID_SIZE(inputs.size(), 1);
- Deserializer::TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
+ TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
CHECK_VALID_SIZE(outputs.size(), 1);
armnn::LogSoftmaxDescriptor descriptor;
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseMinimum(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseMinimum(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
auto inputs = GetInputs(graph, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseMaximum(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseMaximum(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
auto inputs = GetInputs(graph, layerIndex);
}
}
-void Deserializer::ParseComparison(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseComparison(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
CHECK_LOCATION();
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseElementwiseUnary(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseElementwiseUnary(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
CHECK_LOCATION();
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseConcat(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseConcat(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
CHECK_LOCATION();
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseMultiplication(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseMultiplication(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
auto inputs = GetInputs(graph, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseFloor(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseFloor(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
CHECK_LOCATION();
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseFullyConnected(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseFullyConnected(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
auto inputs = GetInputs(graph, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParsePad(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParsePad(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
- Deserializer::TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
+ TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
CHECK_VALID_SIZE(inputs.size(), 1);
- Deserializer::TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
+ TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
CHECK_VALID_SIZE(outputs.size(), 1);
auto flatBufferDescriptor = graph->layers()->Get(layerIndex)->layer_as_PadLayer()->descriptor();
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParsePermute(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParsePermute(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-armnn::Pooling2dDescriptor Deserializer::GetPoolingDescriptor(Deserializer::PoolingDescriptor pooling2dDesc,
+armnn::Pooling2dDescriptor IDeserializer::DeserializerImpl::GetPoolingDescriptor(PoolingDescriptor pooling2dDesc,
unsigned int layerIndex)
{
IgnoreUnused(layerIndex);
return desc;
}
-void Deserializer::ParsePooling2d(GraphPtr graph, unsigned int layerIndex)
+
+
+void IDeserializer::DeserializerImpl::ParsePooling2d(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseQuantize(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseQuantize(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-armnn::TensorInfo Deserializer::OutputShapeOfReshape(const armnn::TensorInfo& inputTensorInfo,
+armnn::TensorInfo IDeserializer::DeserializerImpl::OutputShapeOfReshape(const armnn::TensorInfo& inputTensorInfo,
const std::vector<uint32_t>& targetDimsIn)
{
std::vector<unsigned int> outputDims(targetDimsIn.begin(), targetDimsIn.end());
return reshapeInfo;
}
-void Deserializer::ParseRank(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseRank(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
- Deserializer::TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
+ TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
CHECK_VALID_SIZE(inputs.size(), 1);
- Deserializer::TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
+ TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
CHECK_VALID_SIZE(outputs.size(), 1);
auto layerName = GetLayerName(graph, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseReshape(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseReshape(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
auto inputs = GetInputs(graph, layerIndex);
const auto targetDims = graph->layers()->Get(layerIndex)->layer_as_ReshapeLayer()->descriptor()->targetShape();
std::vector<uint32_t> outputDims(targetDims->begin(), targetDims->begin() + targetDims->size());
- armnn::TensorInfo reshapeOutputTensorInfo = Deserializer::OutputShapeOfReshape(inputTensorInfo, outputDims);
+ armnn::TensorInfo reshapeOutputTensorInfo = DeserializerImpl::OutputShapeOfReshape(inputTensorInfo, outputDims);
const armnn::TensorShape& reshapeOutputTensorShape = reshapeOutputTensorInfo.GetShape();
const std::vector<uint32_t> expectedDims(outputs[0]->dimensions()->begin(),
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseResize(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseResize(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
- Deserializer::TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
+ TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
CHECK_VALID_SIZE(inputs.size(), 1);
- Deserializer::TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
+ TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
CHECK_VALID_SIZE(outputs.size(), 1);
auto flatBufferDescriptor = graph->layers()->Get(layerIndex)->layer_as_ResizeLayer()->descriptor();
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseResizeBilinear(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseResizeBilinear(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
- Deserializer::TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
+ TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
CHECK_VALID_SIZE(inputs.size(), 1);
- Deserializer::TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
+ TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
CHECK_VALID_SIZE(outputs.size(), 1);
auto flatBufferDescriptor = graph->layers()->Get(layerIndex)->layer_as_ResizeBilinearLayer()->descriptor();
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseSoftmax(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseSoftmax(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
- Deserializer::TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
+ TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
CHECK_VALID_SIZE(inputs.size(), 1);
- Deserializer::TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
+ TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
CHECK_VALID_SIZE(outputs.size(), 1);
armnn::SoftmaxDescriptor descriptor;
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseSpaceToBatchNd(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseSpaceToBatchNd(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
- Deserializer::TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
+ TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
CHECK_VALID_SIZE(inputs.size(), 1);
- Deserializer::TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
+ TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
CHECK_VALID_SIZE(outputs.size(), 1);
auto flatBufferDescriptor = graph->layers()->Get(layerIndex)->layer_as_SpaceToBatchNdLayer()->descriptor();
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseSpaceToDepth(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseSpaceToDepth(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
- Deserializer::TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
+ TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
CHECK_VALID_SIZE(inputs.size(), 1);
- Deserializer::TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
+ TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
CHECK_VALID_SIZE(outputs.size(), 1);
auto flatBufferDescriptor = graph->layers()->Get(layerIndex)->layer_as_SpaceToDepthLayer()->descriptor();
RegisterOutputSlots(graph, layerIndex, layer);
}
-armnn::NormalizationDescriptor Deserializer::GetNormalizationDescriptor(
- Deserializer::NormalizationDescriptorPtr normalizationDescriptor,
+armnn::NormalizationDescriptor IDeserializer::DeserializerImpl::GetNormalizationDescriptor(
+ NormalizationDescriptorPtr normalizationDescriptor,
unsigned int layerIndex)
{
IgnoreUnused(layerIndex);
return desc;
}
-void Deserializer::ParseNormalization(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseNormalization(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
auto normalizationDes = graph->layers()->Get(layerIndex)->layer_as_NormalizationLayer()->descriptor();
- Deserializer::TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
+ TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
CHECK_VALID_SIZE(inputs.size(), 1);
- Deserializer::TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
+ TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
CHECK_VALID_SIZE(outputs.size(), 1);
auto outputInfo = ToTensorInfo(outputs[0]);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseRsqrt(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseRsqrt(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
auto inputs = GetInputs(graph, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseSlice(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseSlice(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseStridedSlice(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseStridedSlice(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
- Deserializer::TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
+ TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
CHECK_VALID_SIZE(inputs.size(), 1);
- Deserializer::TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
+ TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
CHECK_VALID_SIZE(outputs.size(), 1);
auto flatBufferDescriptor = graph->layers()->Get(layerIndex)->layer_as_StridedSliceLayer()->descriptor();
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseSubtraction(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseSubtraction(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
auto inputs = GetInputs(graph, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseGather(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseGather(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
- Deserializer::TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
+ TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
CHECK_VALID_SIZE(inputs.size(), 2);
- Deserializer::TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
+ TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
CHECK_VALID_SIZE(outputs.size(), 1);
armnn::GatherDescriptor descriptor;
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseMean(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseMean(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
- Deserializer::TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
+ TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
CHECK_VALID_SIZE(inputs.size(), 1);
- Deserializer::TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
+ TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
CHECK_VALID_SIZE(outputs.size(), 1);
auto flatBufferDescriptor = graph->layers()->Get(layerIndex)->layer_as_MeanLayer()->descriptor();
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseSplitter(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseSplitter(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
- Deserializer::TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
+ TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
CHECK_VALID_SIZE(inputs.size(), 1);
- Deserializer::TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
+ TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
auto flatBufferViewsDescriptor = graph->layers()->Get(layerIndex)->layer_as_SplitterLayer()->descriptor();
auto flatBufferViewSizes = flatBufferViewsDescriptor->viewSizes();
RegisterOutputSlots(graph, layerIndex, layer);
}
-armnn::LstmDescriptor Deserializer::GetLstmDescriptor(Deserializer::LstmDescriptorPtr lstmDescriptor)
+armnn::LstmDescriptor IDeserializer::DeserializerImpl::GetLstmDescriptor(LstmDescriptorPtr lstmDescriptor)
{
armnn::LstmDescriptor desc;
return desc;
}
-void Deserializer::ParseLstm(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseLstm(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-armnn::QLstmDescriptor Deserializer::GetQLstmDescriptor(Deserializer::QLstmDescriptorPtr qLstmDescriptor)
+armnn::QLstmDescriptor IDeserializer::DeserializerImpl::GetQLstmDescriptor(QLstmDescriptorPtr qLstmDescriptor)
{
armnn::QLstmDescriptor desc;
return desc;
}
-void Deserializer::ParseQLstm(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseQLstm(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseQuantizedLstm(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseQuantizedLstm(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseDequantize(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseDequantize(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
- Deserializer::TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
+ TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
CHECK_VALID_SIZE(inputs.size(), 1);
- Deserializer::TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
+ TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
CHECK_VALID_SIZE(outputs.size(), 1);
const std::string layerName = GetLayerName(graph, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseMerge(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseMerge(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
- Deserializer::TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
+ TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
CHECK_VALID_SIZE(inputs.size(), 2);
- Deserializer::TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
+ TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
CHECK_VALID_SIZE(outputs.size(), 1);
const std::string layerName = GetLayerName(graph, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseSwitch(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseSwitch(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
auto inputs = GetInputs(graph, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParsePrelu(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParsePrelu(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
auto inputs = GetInputs(graph, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseTranspose(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseTranspose(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseTransposeConvolution2d(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseTransposeConvolution2d(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseStack(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseStack(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);
auto inputs = GetInputs(graph, layerIndex);
RegisterOutputSlots(graph, layerIndex, layer);
}
-void Deserializer::ParseStandIn(GraphPtr graph, unsigned int layerIndex)
+void IDeserializer::DeserializerImpl::ParseStandIn(GraphPtr graph, unsigned int layerIndex)
{
CHECK_LAYERS(graph, 0, layerIndex);