ArmNN
 24.02
IDeserializer::DeserializerImpl Class Reference

#include <Deserializer.hpp>

Public Member Functions

armnn::INetworkPtr CreateNetworkFromBinary (const std::vector< uint8_t > &binaryContent)
 Create an input network from binary file contents. More...
 
armnn::INetworkPtr CreateNetworkFromBinary (std::istream &binaryContent)
 Create an input network from a binary input stream. More...
 
BindingPointInfo GetNetworkInputBindingInfo (unsigned int layerId, const std::string &name) const
 Retrieve binding info (layer id and tensor info) for the network input identified by the given layer name. More...
 
BindingPointInfo GetNetworkOutputBindingInfo (unsigned int layerId, const std::string &name) const
 Retrieve binding info (layer id and tensor info) for the network output identified by the given layer name. More...
 
 DeserializerImpl ()
 
 ~DeserializerImpl ()=default
 
 DeserializerImpl (const DeserializerImpl &)=delete
 
DeserializerImploperator= (const DeserializerImpl &)=delete
 

Static Public Member Functions

static GraphPtr LoadGraphFromBinary (const uint8_t *binaryContent, size_t len)
 
static TensorRawPtrVector GetInputs (const GraphPtr &graph, unsigned int layerIndex)
 
static TensorRawPtrVector GetOutputs (const GraphPtr &graph, unsigned int layerIndex)
 
static LayerBaseRawPtr GetBaseLayer (const GraphPtr &graphPtr, unsigned int layerIndex)
 
static int32_t GetBindingLayerInfo (const GraphPtr &graphPtr, unsigned int layerIndex)
 
static std::string GetLayerName (const GraphPtr &graph, unsigned int index)
 
static armnn::Pooling2dDescriptor GetPooling2dDescriptor (Pooling2dDescriptor pooling2dDescriptor, unsigned int layerIndex)
 
static armnn::Pooling3dDescriptor GetPooling3dDescriptor (Pooling3dDescriptor pooling3dDescriptor, unsigned int layerIndex)
 
static armnn::NormalizationDescriptor GetNormalizationDescriptor (NormalizationDescriptorPtr normalizationDescriptor, unsigned int layerIndex)
 
static armnn::LstmDescriptor GetLstmDescriptor (LstmDescriptorPtr lstmDescriptor)
 
static armnn::LstmInputParams GetLstmInputParams (LstmDescriptorPtr lstmDescriptor, LstmInputParamsPtr lstmInputParams)
 
static armnn::QLstmDescriptor GetQLstmDescriptor (QLstmDescriptorPtr qLstmDescriptorPtr)
 
static armnn::UnidirectionalSequenceLstmDescriptor GetUnidirectionalSequenceLstmDescriptor (UnidirectionalSequenceLstmDescriptorPtr descriptor)
 
static armnn::TensorInfo OutputShapeOfReshape (const armnn::TensorInfo &inputTensorInfo, const std::vector< uint32_t > &targetDimsIn)
 

Detailed Description

Definition at line 34 of file Deserializer.hpp.

Constructor & Destructor Documentation

◆ DeserializerImpl() [1/2]

Definition at line 207 of file Deserializer.cpp.

208 : m_Network(nullptr, nullptr),
209 //May require LayerType_Max to be included
210 m_ParserFunctions(Layer_MAX+1, &IDeserializer::DeserializerImpl::ParseUnsupportedLayer)
211 {
212  // register supported layers
213  m_ParserFunctions[Layer_AbsLayer] = &DeserializerImpl::ParseAbs;
214  m_ParserFunctions[Layer_ActivationLayer] = &DeserializerImpl::ParseActivation;
215  m_ParserFunctions[Layer_AdditionLayer] = &DeserializerImpl::ParseAdd;
216  m_ParserFunctions[Layer_ArgMinMaxLayer] = &DeserializerImpl::ParseArgMinMax;
217  m_ParserFunctions[Layer_BatchMatMulLayer] = &DeserializerImpl::ParseBatchMatMul;
218  m_ParserFunctions[Layer_BatchToSpaceNdLayer] = &DeserializerImpl::ParseBatchToSpaceNd;
219  m_ParserFunctions[Layer_BatchNormalizationLayer] = &DeserializerImpl::ParseBatchNormalization;
220  m_ParserFunctions[Layer_CastLayer] = &DeserializerImpl::ParseCast;
221  m_ParserFunctions[Layer_ChannelShuffleLayer] = &DeserializerImpl::ParseChannelShuffle;
222  m_ParserFunctions[Layer_ComparisonLayer] = &DeserializerImpl::ParseComparison;
223  m_ParserFunctions[Layer_ConcatLayer] = &DeserializerImpl::ParseConcat;
224  m_ParserFunctions[Layer_ConstantLayer] = &DeserializerImpl::ParseConstant;
225  m_ParserFunctions[Layer_Convolution2dLayer] = &DeserializerImpl::ParseConvolution2d;
226  m_ParserFunctions[Layer_Convolution3dLayer] = &DeserializerImpl::ParseConvolution3d;
227  m_ParserFunctions[Layer_DepthToSpaceLayer] = &DeserializerImpl::ParseDepthToSpace;
228  m_ParserFunctions[Layer_DepthwiseConvolution2dLayer] = &DeserializerImpl::ParseDepthwiseConvolution2d;
229  m_ParserFunctions[Layer_DequantizeLayer] = &DeserializerImpl::ParseDequantize;
230  m_ParserFunctions[Layer_DetectionPostProcessLayer] = &DeserializerImpl::ParseDetectionPostProcess;
231  m_ParserFunctions[Layer_DivisionLayer] = &DeserializerImpl::ParseDivision;
232  m_ParserFunctions[Layer_ElementwiseBinaryLayer] = &DeserializerImpl::ParseElementwiseBinary;
233  m_ParserFunctions[Layer_ElementwiseUnaryLayer] = &DeserializerImpl::ParseElementwiseUnary;
234  m_ParserFunctions[Layer_EqualLayer] = &DeserializerImpl::ParseEqual;
235  m_ParserFunctions[Layer_FullyConnectedLayer] = &DeserializerImpl::ParseFullyConnected;
236  m_ParserFunctions[Layer_FillLayer] = &DeserializerImpl::ParseFill;
237  m_ParserFunctions[Layer_FloorLayer] = &DeserializerImpl::ParseFloor;
238  m_ParserFunctions[Layer_GatherLayer] = &DeserializerImpl::ParseGather;
239  m_ParserFunctions[Layer_GatherNdLayer] = &DeserializerImpl::ParseGatherNd;
240  m_ParserFunctions[Layer_GreaterLayer] = &DeserializerImpl::ParseGreater;
241  m_ParserFunctions[Layer_InstanceNormalizationLayer] = &DeserializerImpl::ParseInstanceNormalization;
242  m_ParserFunctions[Layer_L2NormalizationLayer] = &DeserializerImpl::ParseL2Normalization;
243  m_ParserFunctions[Layer_LogicalBinaryLayer] = &DeserializerImpl::ParseLogicalBinary;
244  m_ParserFunctions[Layer_LogSoftmaxLayer] = &DeserializerImpl::ParseLogSoftmax;
245  m_ParserFunctions[Layer_LstmLayer] = &DeserializerImpl::ParseLstm;
246  m_ParserFunctions[Layer_MaximumLayer] = &DeserializerImpl::ParseMaximum;
247  m_ParserFunctions[Layer_MeanLayer] = &DeserializerImpl::ParseMean;
248  m_ParserFunctions[Layer_MinimumLayer] = &DeserializerImpl::ParseMinimum;
249  m_ParserFunctions[Layer_MergeLayer] = &DeserializerImpl::ParseMerge;
250  m_ParserFunctions[Layer_MergerLayer] = &DeserializerImpl::ParseConcat;
251  m_ParserFunctions[Layer_MultiplicationLayer] = &DeserializerImpl::ParseMultiplication;
252  m_ParserFunctions[Layer_NormalizationLayer] = &DeserializerImpl::ParseNormalization;
253  m_ParserFunctions[Layer_PadLayer] = &DeserializerImpl::ParsePad;
254  m_ParserFunctions[Layer_PermuteLayer] = &DeserializerImpl::ParsePermute;
255  m_ParserFunctions[Layer_Pooling2dLayer] = &DeserializerImpl::ParsePooling2d;
256  m_ParserFunctions[Layer_Pooling3dLayer] = &DeserializerImpl::ParsePooling3d;
257  m_ParserFunctions[Layer_PreluLayer] = &DeserializerImpl::ParsePrelu;
258  m_ParserFunctions[Layer_QLstmLayer] = &DeserializerImpl::ParseQLstm;
259  m_ParserFunctions[Layer_QuantizeLayer] = &DeserializerImpl::ParseQuantize;
260  m_ParserFunctions[Layer_QuantizedLstmLayer] = &DeserializerImpl::ParseQuantizedLstm;
261  m_ParserFunctions[Layer_RankLayer] = &DeserializerImpl::ParseRank;
262  m_ParserFunctions[Layer_ReduceLayer] = &DeserializerImpl::ParseReduce;
263  m_ParserFunctions[Layer_ReshapeLayer] = &DeserializerImpl::ParseReshape;
264  m_ParserFunctions[Layer_ResizeBilinearLayer] = &DeserializerImpl::ParseResizeBilinear;
265  m_ParserFunctions[Layer_ResizeLayer] = &DeserializerImpl::ParseResize;
266  m_ParserFunctions[Layer_ReverseV2Layer] = &DeserializerImpl::ParseReverseV2;
267  m_ParserFunctions[Layer_RsqrtLayer] = &DeserializerImpl::ParseRsqrt;
268  m_ParserFunctions[Layer_ShapeLayer] = &DeserializerImpl::ParseShape;
269  m_ParserFunctions[Layer_SliceLayer] = &DeserializerImpl::ParseSlice;
270  m_ParserFunctions[Layer_SoftmaxLayer] = &DeserializerImpl::ParseSoftmax;
271  m_ParserFunctions[Layer_SpaceToBatchNdLayer] = &DeserializerImpl::ParseSpaceToBatchNd;
272  m_ParserFunctions[Layer_SpaceToDepthLayer] = &DeserializerImpl::ParseSpaceToDepth;
273  m_ParserFunctions[Layer_SplitterLayer] = &DeserializerImpl::ParseSplitter;
274  m_ParserFunctions[Layer_StackLayer] = &DeserializerImpl::ParseStack;
275  m_ParserFunctions[Layer_StandInLayer] = &DeserializerImpl::ParseStandIn;
276  m_ParserFunctions[Layer_StridedSliceLayer] = &DeserializerImpl::ParseStridedSlice;
277  m_ParserFunctions[Layer_SubtractionLayer] = &DeserializerImpl::ParseSubtraction;
278  m_ParserFunctions[Layer_SwitchLayer] = &DeserializerImpl::ParseSwitch;
279  m_ParserFunctions[Layer_TileLayer] = &DeserializerImpl::ParseTile;
280  m_ParserFunctions[Layer_TransposeConvolution2dLayer] = &DeserializerImpl::ParseTransposeConvolution2d;
281  m_ParserFunctions[Layer_TransposeLayer] = &DeserializerImpl::ParseTranspose;
282  m_ParserFunctions[Layer_UnidirectionalSequenceLstmLayer] = &DeserializerImpl::ParseUnidirectionalSequenceLstm;
283 }

◆ ~DeserializerImpl()

~DeserializerImpl ( )
default

◆ DeserializerImpl() [2/2]

DeserializerImpl ( const DeserializerImpl )
delete

Member Function Documentation

◆ CreateNetworkFromBinary() [1/2]

INetworkPtr CreateNetworkFromBinary ( const std::vector< uint8_t > &  binaryContent)

Create an input network from binary file contents.

Definition at line 854 of file Deserializer.cpp.

855 {
856  ResetParser();
857  GraphPtr graph = LoadGraphFromBinary(binaryContent.data(), binaryContent.size());
858  return CreateNetworkFromGraph(graph);
859 }

◆ CreateNetworkFromBinary() [2/2]

armnn::INetworkPtr CreateNetworkFromBinary ( std::istream &  binaryContent)

Create an input network from a binary input stream.

Definition at line 861 of file Deserializer.cpp.

862 {
863  ResetParser();
864  if (binaryContent.fail()) {
865  ARMNN_LOG(error) << (std::string("Cannot read input"));
866  throw ParseException("Unable to read Input stream data");
867  }
868  binaryContent.seekg(0, std::ios::end);
869  const std::streamoff size = binaryContent.tellg();
870  std::vector<char> content(static_cast<size_t>(size));
871  binaryContent.seekg(0);
872  binaryContent.read(content.data(), static_cast<std::streamsize>(size));
873  GraphPtr graph = LoadGraphFromBinary(reinterpret_cast<uint8_t*>(content.data()), static_cast<size_t>(size));
874  return CreateNetworkFromGraph(graph);
875 }

References ARMNN_LOG, and armnn::error.

◆ GetBaseLayer()

LayerBaseRawPtr GetBaseLayer ( const GraphPtr graphPtr,
unsigned int  layerIndex 
)
static

Definition at line 285 of file Deserializer.cpp.

286 {
287  auto layerType = graphPtr->layers()->Get(layerIndex)->layer_type();
288 
289  switch(layerType)
290  {
291  case Layer::Layer_AbsLayer:
292  return graphPtr->layers()->Get(layerIndex)->layer_as_AbsLayer()->base();
293  case Layer::Layer_ActivationLayer:
294  return graphPtr->layers()->Get(layerIndex)->layer_as_ActivationLayer()->base();
295  case Layer::Layer_AdditionLayer:
296  return graphPtr->layers()->Get(layerIndex)->layer_as_AdditionLayer()->base();
297  case Layer::Layer_ArgMinMaxLayer:
298  return graphPtr->layers()->Get(layerIndex)->layer_as_ArgMinMaxLayer()->base();
299  case Layer::Layer_BatchMatMulLayer:
300  return graphPtr->layers()->Get(layerIndex)->layer_as_BatchMatMulLayer()->base();
301  case Layer::Layer_BatchToSpaceNdLayer:
302  return graphPtr->layers()->Get(layerIndex)->layer_as_BatchToSpaceNdLayer()->base();
303  case Layer::Layer_BatchNormalizationLayer:
304  return graphPtr->layers()->Get(layerIndex)->layer_as_BatchNormalizationLayer()->base();
305  case Layer::Layer_CastLayer:
306  return graphPtr->layers()->Get(layerIndex)->layer_as_CastLayer()->base();
307  case Layer::Layer_ChannelShuffleLayer:
308  return graphPtr->layers()->Get(layerIndex)->layer_as_ChannelShuffleLayer()->base();
309  case Layer::Layer_ComparisonLayer:
310  return graphPtr->layers()->Get(layerIndex)->layer_as_ComparisonLayer()->base();
311  case Layer::Layer_ConcatLayer:
312  return graphPtr->layers()->Get(layerIndex)->layer_as_ConcatLayer()->base();
313  case Layer::Layer_ConstantLayer:
314  return graphPtr->layers()->Get(layerIndex)->layer_as_ConstantLayer()->base();
315  case Layer::Layer_Convolution2dLayer:
316  return graphPtr->layers()->Get(layerIndex)->layer_as_Convolution2dLayer()->base();
317  case Layer::Layer_Convolution3dLayer:
318  return graphPtr->layers()->Get(layerIndex)->layer_as_Convolution3dLayer()->base();
319  case Layer::Layer_DepthToSpaceLayer:
320  return graphPtr->layers()->Get(layerIndex)->layer_as_DepthToSpaceLayer()->base();
321  case Layer::Layer_DepthwiseConvolution2dLayer:
322  return graphPtr->layers()->Get(layerIndex)->layer_as_DepthwiseConvolution2dLayer()->base();
323  case Layer::Layer_DequantizeLayer:
324  return graphPtr->layers()->Get(layerIndex)->layer_as_DequantizeLayer()->base();
325  case Layer::Layer_DetectionPostProcessLayer:
326  return graphPtr->layers()->Get(layerIndex)->layer_as_DetectionPostProcessLayer()->base();
327  case Layer::Layer_DivisionLayer:
328  return graphPtr->layers()->Get(layerIndex)->layer_as_DivisionLayer()->base();
329  case Layer::Layer_EqualLayer:
330  return graphPtr->layers()->Get(layerIndex)->layer_as_EqualLayer()->base();
331  case Layer::Layer_ElementwiseBinaryLayer:
332  return graphPtr->layers()->Get(layerIndex)->layer_as_ElementwiseBinaryLayer()->base();
333  case Layer::Layer_ElementwiseUnaryLayer:
334  return graphPtr->layers()->Get(layerIndex)->layer_as_ElementwiseUnaryLayer()->base();
335  case Layer::Layer_FullyConnectedLayer:
336  return graphPtr->layers()->Get(layerIndex)->layer_as_FullyConnectedLayer()->base();
337  case Layer::Layer_FillLayer:
338  return graphPtr->layers()->Get(layerIndex)->layer_as_FillLayer()->base();
339  case Layer::Layer_FloorLayer:
340  return graphPtr->layers()->Get(layerIndex)->layer_as_FloorLayer()->base();
341  case Layer::Layer_GatherLayer:
342  return graphPtr->layers()->Get(layerIndex)->layer_as_GatherLayer()->base();
343  case Layer::Layer_GatherNdLayer:
344  return graphPtr->layers()->Get(layerIndex)->layer_as_GatherNdLayer()->base();
345  case Layer::Layer_GreaterLayer:
346  return graphPtr->layers()->Get(layerIndex)->layer_as_GreaterLayer()->base();
347  case Layer::Layer_InputLayer:
348  return graphPtr->layers()->Get(layerIndex)->layer_as_InputLayer()->base()->base();
349  case Layer::Layer_InstanceNormalizationLayer:
350  return graphPtr->layers()->Get(layerIndex)->layer_as_InstanceNormalizationLayer()->base();
351  case Layer::Layer_L2NormalizationLayer:
352  return graphPtr->layers()->Get(layerIndex)->layer_as_L2NormalizationLayer()->base();
353  case Layer::Layer_LogicalBinaryLayer:
354  return graphPtr->layers()->Get(layerIndex)->layer_as_LogicalBinaryLayer()->base();
355  case Layer::Layer_LogSoftmaxLayer:
356  return graphPtr->layers()->Get(layerIndex)->layer_as_LogSoftmaxLayer()->base();
357  case Layer::Layer_LstmLayer:
358  return graphPtr->layers()->Get(layerIndex)->layer_as_LstmLayer()->base();
359  case Layer::Layer_MeanLayer:
360  return graphPtr->layers()->Get(layerIndex)->layer_as_MeanLayer()->base();
361  case Layer::Layer_MinimumLayer:
362  return graphPtr->layers()->Get(layerIndex)->layer_as_MinimumLayer()->base();
363  case Layer::Layer_MaximumLayer:
364  return graphPtr->layers()->Get(layerIndex)->layer_as_MaximumLayer()->base();
365  case Layer::Layer_MergeLayer:
366  return graphPtr->layers()->Get(layerIndex)->layer_as_MergeLayer()->base();
367  case Layer::Layer_MergerLayer:
368  return graphPtr->layers()->Get(layerIndex)->layer_as_MergerLayer()->base();
369  case Layer::Layer_MultiplicationLayer:
370  return graphPtr->layers()->Get(layerIndex)->layer_as_MultiplicationLayer()->base();
371  case Layer::Layer_NormalizationLayer:
372  return graphPtr->layers()->Get(layerIndex)->layer_as_NormalizationLayer()->base();
373  case Layer::Layer_OutputLayer:
374  return graphPtr->layers()->Get(layerIndex)->layer_as_OutputLayer()->base()->base();
375  case Layer::Layer_PadLayer:
376  return graphPtr->layers()->Get(layerIndex)->layer_as_PadLayer()->base();
377  case Layer::Layer_PermuteLayer:
378  return graphPtr->layers()->Get(layerIndex)->layer_as_PermuteLayer()->base();
379  case Layer::Layer_Pooling2dLayer:
380  return graphPtr->layers()->Get(layerIndex)->layer_as_Pooling2dLayer()->base();
381  case Layer::Layer_Pooling3dLayer:
382  return graphPtr->layers()->Get(layerIndex)->layer_as_Pooling3dLayer()->base();
383  case Layer::Layer_PreluLayer:
384  return graphPtr->layers()->Get(layerIndex)->layer_as_PreluLayer()->base();
385  case Layer::Layer_QLstmLayer:
386  return graphPtr->layers()->Get(layerIndex)->layer_as_QLstmLayer()->base();
387  case Layer::Layer_QuantizeLayer:
388  return graphPtr->layers()->Get(layerIndex)->layer_as_QuantizeLayer()->base();
389  case Layer::Layer_QuantizedLstmLayer:
390  return graphPtr->layers()->Get(layerIndex)->layer_as_QuantizedLstmLayer()->base();
391  case Layer::Layer_RankLayer:
392  return graphPtr->layers()->Get(layerIndex)->layer_as_RankLayer()->base();
393  case Layer::Layer_ReduceLayer:
394  return graphPtr->layers()->Get(layerIndex)->layer_as_ReduceLayer()->base();
395  case Layer::Layer_ReshapeLayer:
396  return graphPtr->layers()->Get(layerIndex)->layer_as_ReshapeLayer()->base();
397  case Layer::Layer_ResizeBilinearLayer:
398  return graphPtr->layers()->Get(layerIndex)->layer_as_ResizeBilinearLayer()->base();
399  case Layer::Layer_ResizeLayer:
400  return graphPtr->layers()->Get(layerIndex)->layer_as_ResizeLayer()->base();
401  case Layer::Layer_ReverseV2Layer:
402  return graphPtr->layers()->Get(layerIndex)->layer_as_ReverseV2Layer()->base();
403  case Layer::Layer_RsqrtLayer:
404  return graphPtr->layers()->Get(layerIndex)->layer_as_RsqrtLayer()->base();
405  case Layer::Layer_ShapeLayer:
406  return graphPtr->layers()->Get(layerIndex)->layer_as_ShapeLayer()->base();
407  case Layer::Layer_SliceLayer:
408  return graphPtr->layers()->Get(layerIndex)->layer_as_SliceLayer()->base();
409  case Layer::Layer_SoftmaxLayer:
410  return graphPtr->layers()->Get(layerIndex)->layer_as_SoftmaxLayer()->base();
411  case Layer::Layer_SpaceToBatchNdLayer:
412  return graphPtr->layers()->Get(layerIndex)->layer_as_SpaceToBatchNdLayer()->base();
413  case Layer::Layer_SpaceToDepthLayer:
414  return graphPtr->layers()->Get(layerIndex)->layer_as_SpaceToDepthLayer()->base();
415  case Layer::Layer_SplitterLayer:
416  return graphPtr->layers()->Get(layerIndex)->layer_as_SplitterLayer()->base();
417  case Layer::Layer_StackLayer:
418  return graphPtr->layers()->Get(layerIndex)->layer_as_StackLayer()->base();
419  case Layer::Layer_StandInLayer:
420  return graphPtr->layers()->Get(layerIndex)->layer_as_StandInLayer()->base();
421  case Layer::Layer_StridedSliceLayer:
422  return graphPtr->layers()->Get(layerIndex)->layer_as_StridedSliceLayer()->base();
423  case Layer::Layer_SubtractionLayer:
424  return graphPtr->layers()->Get(layerIndex)->layer_as_SubtractionLayer()->base();
425  case Layer::Layer_SwitchLayer:
426  return graphPtr->layers()->Get(layerIndex)->layer_as_SwitchLayer()->base();
427  case Layer::Layer_TileLayer:
428  return graphPtr->layers()->Get(layerIndex)->layer_as_TileLayer()->base();
429  case Layer::Layer_TransposeConvolution2dLayer:
430  return graphPtr->layers()->Get(layerIndex)->layer_as_TransposeConvolution2dLayer()->base();
431  case Layer::Layer_TransposeLayer:
432  return graphPtr->layers()->Get(layerIndex)->layer_as_TransposeLayer()->base();
433  case Layer::Layer_UnidirectionalSequenceLstmLayer:
434  return graphPtr->layers()->Get(layerIndex)->layer_as_UnidirectionalSequenceLstmLayer()->base();
435  case Layer::Layer_NONE:
436  default:
437  throw ParseException(fmt::format("Layer type {} not recognized", layerType));
438  }
439 }

◆ GetBindingLayerInfo()

int32_t GetBindingLayerInfo ( const GraphPtr graphPtr,
unsigned int  layerIndex 
)
static

Definition at line 448 of file Deserializer.cpp.

449 {
450  auto layerType = graphPtr->layers()->Get(layerIndex)->layer_type();
451 
452  if (layerType == Layer::Layer_InputLayer)
453  {
454  return graphPtr->layers()->Get(layerIndex)->layer_as_InputLayer()->base()->layerBindingId();
455  }
456  else if ( layerType == Layer::Layer_OutputLayer )
457  {
458  return graphPtr->layers()->Get(layerIndex)->layer_as_OutputLayer()->base()->layerBindingId();
459  }
460  return 0;
461 }

◆ GetInputs()

TensorRawPtrVector GetInputs ( const GraphPtr graph,
unsigned int  layerIndex 
)
static

Definition at line 803 of file Deserializer.cpp.

804 {
805  CHECK_LAYERS(graphPtr, 0, layerIndex);
806  auto layer = GetBaseLayer(graphPtr, layerIndex);
807  const auto& numInputs = layer->inputSlots()->size();
808 
809  TensorRawPtrVector result(numInputs);
810 
811  for (unsigned int i=0; i<numInputs; ++i)
812  {
813  auto inputId = CHECKED_NON_NEGATIVE(static_cast<int32_t>
814  (layer->inputSlots()->Get(i)->connection()->sourceLayerIndex()));
815  result[i] = GetBaseLayer(graphPtr, inputId)->outputSlots()->Get(0)->tensorInfo();
816  }
817  return result;
818 }

References CHECK_LAYERS, and CHECKED_NON_NEGATIVE.

◆ GetLayerName()

std::string GetLayerName ( const GraphPtr graph,
unsigned int  index 
)
static

Definition at line 441 of file Deserializer.cpp.

442 {
443  auto layer = GetBaseLayer(graph, index);
444  assert(layer);
445  return layer->layerName()->str();
446 }

◆ GetLstmDescriptor()

armnn::LstmDescriptor GetLstmDescriptor ( LstmDescriptorPtr  lstmDescriptor)
static

Definition at line 3285 of file Deserializer.cpp.

3286 {
3287  armnn::LstmDescriptor desc;
3288 
3289  desc.m_ActivationFunc = lstmDescriptor->activationFunc();
3290  desc.m_ClippingThresCell = lstmDescriptor->clippingThresCell();
3291  desc.m_ClippingThresProj = lstmDescriptor->clippingThresProj();
3292  desc.m_CifgEnabled = lstmDescriptor->cifgEnabled();
3293  desc.m_PeepholeEnabled = lstmDescriptor->peepholeEnabled();
3294  desc.m_ProjectionEnabled = lstmDescriptor->projectionEnabled();
3295  desc.m_LayerNormEnabled = lstmDescriptor->layerNormEnabled();
3296 
3297  return desc;
3298 }

References LstmDescriptor::m_ActivationFunc, LstmDescriptor::m_CifgEnabled, LstmDescriptor::m_ClippingThresCell, LstmDescriptor::m_ClippingThresProj, LstmDescriptor::m_LayerNormEnabled, LstmDescriptor::m_PeepholeEnabled, and LstmDescriptor::m_ProjectionEnabled.

◆ GetLstmInputParams()

static armnn::LstmInputParams GetLstmInputParams ( LstmDescriptorPtr  lstmDescriptor,
LstmInputParamsPtr  lstmInputParams 
)
static

◆ GetNetworkInputBindingInfo()

BindingPointInfo GetNetworkInputBindingInfo ( unsigned int  layerId,
const std::string &  name 
) const

Retrieve binding info (layer id and tensor info) for the network input identified by the given layer name.

Definition at line 939 of file Deserializer.cpp.

941 {
942  IgnoreUnused(layerIndex);
943  for (auto inputBinding : m_InputBindings)
944  {
945  if (inputBinding.first == name)
946  {
947  return inputBinding.second;
948  }
949  }
950  throw ParseException(fmt::format("No input binding found for layer:{0} / {1}",
951  name,
952  CHECK_LOCATION().AsString()));
953 }

References CHECK_LOCATION, and armnn::IgnoreUnused().

◆ GetNetworkOutputBindingInfo()

BindingPointInfo GetNetworkOutputBindingInfo ( unsigned int  layerId,
const std::string &  name 
) const

Retrieve binding info (layer id and tensor info) for the network output identified by the given layer name.

Definition at line 955 of file Deserializer.cpp.

957 {
958  IgnoreUnused(layerIndex);
959  for (auto outputBinding : m_OutputBindings)
960  {
961  if (outputBinding.first == name)
962  {
963  return outputBinding.second;
964  }
965  }
966  throw ParseException(fmt::format("No output binding found for layer:{0} / {1}",
967  name,
968  CHECK_LOCATION().AsString()));
969 }

References CHECK_LOCATION, and armnn::IgnoreUnused().

◆ GetNormalizationDescriptor()

armnn::NormalizationDescriptor GetNormalizationDescriptor ( NormalizationDescriptorPtr  normalizationDescriptor,
unsigned int  layerIndex 
)
static

Definition at line 2950 of file Deserializer.cpp.

2953 {
2954  IgnoreUnused(layerIndex);
2956 
2957  switch (normalizationDescriptor->normChannelType())
2958  {
2959  case NormalizationAlgorithmChannel_Across:
2960  {
2962  break;
2963  }
2964  case NormalizationAlgorithmChannel_Within:
2965  {
2967  break;
2968  }
2969  default:
2970  {
2971  throw ParseException("Unsupported normalization channel type");
2972  }
2973  }
2974 
2975  switch (normalizationDescriptor->normMethodType())
2976  {
2977  case NormalizationAlgorithmMethod_LocalBrightness:
2978  {
2980  break;
2981  }
2982  case NormalizationAlgorithmMethod_LocalContrast:
2983  {
2985  break;
2986  }
2987  default:
2988  {
2989  throw ParseException("Unsupported normalization method type");
2990  }
2991  }
2992 
2993  switch (normalizationDescriptor->dataLayout())
2994  {
2995  case DataLayout_NCHW:
2996  {
2998  break;
2999  }
3000  case DataLayout_NHWC:
3001  {
3003  break;
3004  }
3005  default:
3006  {
3007  throw ParseException("Unsupported data layout");
3008  }
3009  }
3010 
3011  desc.m_Alpha = normalizationDescriptor->alpha();
3012  desc.m_Beta = normalizationDescriptor->beta();
3013  desc.m_K = normalizationDescriptor->k();
3014  desc.m_NormSize = normalizationDescriptor->normSize();
3015 
3016  return desc;
3017 }

References armnn::Across, armnn::IgnoreUnused(), armnn::LocalBrightness, armnn::LocalContrast, NormalizationDescriptor::m_Alpha, NormalizationDescriptor::m_Beta, NormalizationDescriptor::m_DataLayout, NormalizationDescriptor::m_K, NormalizationDescriptor::m_NormChannelType, NormalizationDescriptor::m_NormMethodType, NormalizationDescriptor::m_NormSize, armnn::NCHW, armnn::NHWC, and armnn::Within.

◆ GetOutputs()

TensorRawPtrVector GetOutputs ( const GraphPtr graph,
unsigned int  layerIndex 
)
static

Definition at line 820 of file Deserializer.cpp.

821 {
822  CHECK_LAYERS(graphPtr, 0, layerIndex);
823  auto layer = GetBaseLayer(graphPtr, layerIndex);
824  const auto& numOutputs = layer->outputSlots()->size();
825 
826  TensorRawPtrVector result(numOutputs);
827 
828  for (unsigned int i=0; i<numOutputs; ++i)
829  {
830  result[i] = layer->outputSlots()->Get(i)->tensorInfo();
831  }
832  return result;
833 }

References CHECK_LAYERS.

◆ GetPooling2dDescriptor()

armnn::Pooling2dDescriptor GetPooling2dDescriptor ( Pooling2dDescriptor  pooling2dDescriptor,
unsigned int  layerIndex 
)
static

Definition at line 2361 of file Deserializer.cpp.

2363 {
2364  IgnoreUnused(layerIndex);
2366 
2367  switch (pooling2dDesc->poolType())
2368  {
2369  case PoolingAlgorithm_Average:
2370  {
2372  break;
2373  }
2374  case PoolingAlgorithm_Max:
2375  {
2377  break;
2378  }
2379  case PoolingAlgorithm_L2:
2380  {
2382  break;
2383  }
2384  default:
2385  {
2386  throw ParseException("Unsupported pooling algorithm");
2387  }
2388  }
2389 
2390  switch (pooling2dDesc->outputShapeRounding())
2391  {
2392  case OutputShapeRounding_Floor:
2393  {
2395  break;
2396  }
2397  case OutputShapeRounding_Ceiling:
2398  {
2400  break;
2401  }
2402  default:
2403  {
2404  throw ParseException("Unsupported output shape rounding");
2405  }
2406  }
2407 
2408  switch (pooling2dDesc->paddingMethod())
2409  {
2410  case PaddingMethod_Exclude:
2411  {
2413  break;
2414  }
2415  case PaddingMethod_IgnoreValue:
2416  {
2418  break;
2419  }
2420  default:
2421  {
2422  throw ParseException("Unsupported padding method");
2423  }
2424  }
2425 
2426  switch (pooling2dDesc->dataLayout())
2427  {
2428  case DataLayout_NCHW:
2429  {
2431  break;
2432  }
2433  case DataLayout_NHWC:
2434  {
2436  break;
2437  }
2438  default:
2439  {
2440  throw ParseException("Unsupported data layout");
2441  }
2442  }
2443 
2444  desc.m_PadRight = pooling2dDesc->padRight();
2445  desc.m_PadLeft = pooling2dDesc->padLeft();
2446  desc.m_PadBottom = pooling2dDesc->padBottom();
2447  desc.m_PadTop = pooling2dDesc->padTop();
2448  desc.m_StrideX = pooling2dDesc->strideX();
2449  desc.m_StrideY = pooling2dDesc->strideY();
2450  desc.m_PoolWidth = pooling2dDesc->poolWidth();
2451  desc.m_PoolHeight = pooling2dDesc->poolHeight();
2452 
2453  return desc;
2454 }

References armnn::Average, armnn::Ceiling, armnn::Exclude, armnn::Floor, armnn::IgnoreUnused(), armnn::IgnoreValue, armnn::L2, Pooling2dDescriptor::m_DataLayout, 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, armnn::NCHW, and armnn::NHWC.

◆ GetPooling3dDescriptor()

armnn::Pooling3dDescriptor GetPooling3dDescriptor ( Pooling3dDescriptor  pooling3dDescriptor,
unsigned int  layerIndex 
)
static

Definition at line 2456 of file Deserializer.cpp.

2458 {
2459  IgnoreUnused(layerIndex);
2461 
2462  switch (pooling3dDesc->poolType())
2463  {
2464  case PoolingAlgorithm_Average:
2465  {
2467  break;
2468  }
2469  case PoolingAlgorithm_Max:
2470  {
2472  break;
2473  }
2474  case PoolingAlgorithm_L2:
2475  {
2477  break;
2478  }
2479  default:
2480  {
2481  throw ParseException("Unsupported pooling algorithm");
2482  }
2483  }
2484 
2485  switch (pooling3dDesc->outputShapeRounding())
2486  {
2487  case OutputShapeRounding_Floor:
2488  {
2490  break;
2491  }
2492  case OutputShapeRounding_Ceiling:
2493  {
2495  break;
2496  }
2497  default:
2498  {
2499  throw ParseException("Unsupported output shape rounding");
2500  }
2501  }
2502 
2503  switch (pooling3dDesc->paddingMethod())
2504  {
2505  case PaddingMethod_Exclude:
2506  {
2508  break;
2509  }
2510  case PaddingMethod_IgnoreValue:
2511  {
2513  break;
2514  }
2515  default:
2516  {
2517  throw ParseException("Unsupported padding method");
2518  }
2519  }
2520 
2521  switch (pooling3dDesc->dataLayout())
2522  {
2523  case DataLayout_NCDHW:
2524  {
2526  break;
2527  }
2528  case DataLayout_NDHWC:
2529  {
2531  break;
2532  }
2533  default:
2534  {
2535  throw ParseException("Unsupported data layout");
2536  }
2537  }
2538 
2539  desc.m_PadRight = pooling3dDesc->padRight();
2540  desc.m_PadLeft = pooling3dDesc->padLeft();
2541  desc.m_PadBottom = pooling3dDesc->padBottom();
2542  desc.m_PadTop = pooling3dDesc->padTop();
2543  desc.m_PadFront = pooling3dDesc->padFront();
2544  desc.m_PadBack = pooling3dDesc->padBack();
2545  desc.m_StrideX = pooling3dDesc->strideX();
2546  desc.m_StrideY = pooling3dDesc->strideY();
2547  desc.m_StrideZ = pooling3dDesc->strideZ();
2548  desc.m_PoolWidth = pooling3dDesc->poolWidth();
2549  desc.m_PoolHeight = pooling3dDesc->poolHeight();
2550  desc.m_PoolDepth = pooling3dDesc->poolDepth();
2551 
2552  return desc;
2553 }

References armnn::Average, armnn::Ceiling, armnn::Exclude, armnn::Floor, armnn::IgnoreUnused(), armnn::IgnoreValue, armnn::L2, Pooling3dDescriptor::m_DataLayout, Pooling3dDescriptor::m_OutputShapeRounding, Pooling3dDescriptor::m_PadBack, Pooling3dDescriptor::m_PadBottom, Pooling3dDescriptor::m_PaddingMethod, Pooling3dDescriptor::m_PadFront, Pooling3dDescriptor::m_PadLeft, Pooling3dDescriptor::m_PadRight, Pooling3dDescriptor::m_PadTop, Pooling3dDescriptor::m_PoolDepth, Pooling3dDescriptor::m_PoolHeight, Pooling3dDescriptor::m_PoolType, Pooling3dDescriptor::m_PoolWidth, Pooling3dDescriptor::m_StrideX, Pooling3dDescriptor::m_StrideY, Pooling3dDescriptor::m_StrideZ, armnn::Max, armnn::NCDHW, and armnn::NDHWC.

◆ GetQLstmDescriptor()

armnn::QLstmDescriptor GetQLstmDescriptor ( QLstmDescriptorPtr  qLstmDescriptorPtr)
static

Definition at line 3416 of file Deserializer.cpp.

3417 {
3419 
3420  desc.m_CifgEnabled = qLstmDescriptor->cifgEnabled();
3421  desc.m_PeepholeEnabled = qLstmDescriptor->peepholeEnabled();
3422  desc.m_ProjectionEnabled = qLstmDescriptor->projectionEnabled();
3423  desc.m_LayerNormEnabled = qLstmDescriptor->layerNormEnabled();
3424 
3425  desc.m_CellClip = qLstmDescriptor->cellClip();
3426  desc.m_ProjectionClip = qLstmDescriptor->projectionClip();
3427 
3428  desc.m_InputIntermediateScale = qLstmDescriptor->inputIntermediateScale();
3429  desc.m_ForgetIntermediateScale = qLstmDescriptor->forgetIntermediateScale();
3430  desc.m_CellIntermediateScale = qLstmDescriptor->cellIntermediateScale();
3431  desc.m_OutputIntermediateScale = qLstmDescriptor->outputIntermediateScale();
3432 
3433  desc.m_HiddenStateScale = qLstmDescriptor->hiddenStateScale();
3434  desc.m_HiddenStateZeroPoint = qLstmDescriptor->hiddenStateZeroPoint();
3435 
3436  return desc;
3437 }

References QLstmDescriptor::m_CellClip, QLstmDescriptor::m_CellIntermediateScale, QLstmDescriptor::m_CifgEnabled, QLstmDescriptor::m_ForgetIntermediateScale, QLstmDescriptor::m_HiddenStateScale, QLstmDescriptor::m_HiddenStateZeroPoint, QLstmDescriptor::m_InputIntermediateScale, QLstmDescriptor::m_LayerNormEnabled, QLstmDescriptor::m_OutputIntermediateScale, QLstmDescriptor::m_PeepholeEnabled, QLstmDescriptor::m_ProjectionClip, and QLstmDescriptor::m_ProjectionEnabled.

◆ GetUnidirectionalSequenceLstmDescriptor()

armnn::UnidirectionalSequenceLstmDescriptor GetUnidirectionalSequenceLstmDescriptor ( UnidirectionalSequenceLstmDescriptorPtr  descriptor)
static

Definition at line 3875 of file Deserializer.cpp.

3877 {
3879 
3880  desc.m_ActivationFunc = descriptor->activationFunc();
3881  desc.m_ClippingThresCell = descriptor->clippingThresCell();
3882  desc.m_ClippingThresProj = descriptor->clippingThresProj();
3883  desc.m_CifgEnabled = descriptor->cifgEnabled();
3884  desc.m_PeepholeEnabled = descriptor->peepholeEnabled();
3885  desc.m_ProjectionEnabled = descriptor->projectionEnabled();
3886  desc.m_LayerNormEnabled = descriptor->layerNormEnabled();
3887  desc.m_TimeMajor = descriptor->timeMajor();
3888 
3889  return desc;
3890 }

References LstmDescriptor::m_ActivationFunc, LstmDescriptor::m_CifgEnabled, LstmDescriptor::m_ClippingThresCell, LstmDescriptor::m_ClippingThresProj, LstmDescriptor::m_LayerNormEnabled, LstmDescriptor::m_PeepholeEnabled, LstmDescriptor::m_ProjectionEnabled, and LstmDescriptor::m_TimeMajor.

◆ LoadGraphFromBinary()

GraphPtr LoadGraphFromBinary ( const uint8_t *  binaryContent,
size_t  len 
)
static

Definition at line 877 of file Deserializer.cpp.

878 {
879  if (binaryContent == nullptr)
880  {
881  throw InvalidArgumentException(fmt::format("Invalid (null) binary content {}",
882  CHECK_LOCATION().AsString()));
883  }
884  flatbuffers::Verifier verifier(binaryContent, len);
885  if (verifier.VerifyBuffer<SerializedGraph>() == false)
886  {
887  throw ParseException(fmt::format("Buffer doesn't conform to the expected Armnn "
888  "flatbuffers format. size:{0} {1}",
889  len,
890  CHECK_LOCATION().AsString()));
891  }
892  return GetSerializedGraph(binaryContent);
893 }

References CHECK_LOCATION.

◆ operator=()

DeserializerImpl& operator= ( const DeserializerImpl )
delete

◆ OutputShapeOfReshape()

armnn::TensorInfo OutputShapeOfReshape ( const armnn::TensorInfo inputTensorInfo,
const std::vector< uint32_t > &  targetDimsIn 
)
static

Definition at line 2616 of file Deserializer.cpp.

2618 {
2619  std::vector<unsigned int> outputDims(targetDimsIn.begin(), targetDimsIn.end());
2620  const auto stretchDim = std::find(targetDimsIn.begin(), targetDimsIn.end(), -1);
2621 
2622  if (stretchDim != targetDimsIn.end())
2623  {
2624  if (std::find(std::next(stretchDim), targetDimsIn.end(), -1) != targetDimsIn.end())
2625  {
2626  throw ParseException(fmt::format("At most one component of shape can be -1 {}",
2627  CHECK_LOCATION().AsString()));
2628  }
2629 
2630  auto targetNumElements =
2631  armnn::numeric_cast<unsigned int>(
2632  std::accumulate(targetDimsIn.begin(), targetDimsIn.end(), -1, std::multiplies<int32_t>()));
2633 
2634  auto stretchIndex = static_cast<size_t>(std::distance(targetDimsIn.begin(), stretchDim));
2635  if (targetNumElements == 0)
2636  {
2637  if (inputTensorInfo.GetNumElements() == 0)
2638  {
2639  outputDims[stretchIndex] = 0;
2640  }
2641  else
2642  {
2643  throw ParseException(
2644  fmt::format("Input to reshape is a tensor with elements, but the requested shape has 0. {}",
2645  CHECK_LOCATION().AsString()));
2646  }
2647  }
2648  else
2649  {
2650  outputDims[stretchIndex] = inputTensorInfo.GetNumElements() / targetNumElements;
2651  }
2652  }
2653 
2654  TensorShape outputShape = TensorShape(static_cast<unsigned int>(outputDims.size()), outputDims.data());
2655 
2656  armnn::TensorInfo reshapeInfo = inputTensorInfo;
2657  reshapeInfo.SetShape(outputShape);
2658 
2659  return reshapeInfo;
2660 }

References CHECK_LOCATION, TensorInfo::GetNumElements(), and TensorInfo::SetShape().


The documentation for this class was generated from the following files:
armnn::Pooling2dDescriptor::m_PaddingMethod
PaddingMethod m_PaddingMethod
The padding method to be used. (Exclude, IgnoreValue).
Definition: Descriptors.hpp:425
armnn::TensorInfo::GetNumElements
unsigned int GetNumElements() const
Definition: Tensor.hpp:198
armnn::QLstmDescriptor::m_ForgetIntermediateScale
float m_ForgetIntermediateScale
Forget intermediate quantization scale.
Definition: Descriptors.hpp:1428
armnn::NormalizationAlgorithmChannel::Within
@ Within
armnn::QLstmDescriptor
A QLstmDescriptor for the QLstmLayer.
Definition: Descriptors.hpp:1380
armnn::DataLayout::NCDHW
@ NCDHW
armnn::QLstmDescriptor::m_ProjectionEnabled
bool m_ProjectionEnabled
Enable/disable the projection layer.
Definition: Descriptors.hpp:1422
armnn::Pooling3dDescriptor::m_OutputShapeRounding
OutputShapeRounding m_OutputShapeRounding
The rounding method for the output shape. (Floor, Ceiling).
Definition: Descriptors.hpp:499
armnn::LstmDescriptor::m_TimeMajor
bool m_TimeMajor
Enable/disable time major.
Definition: Descriptors.hpp:1154
armnn::Pooling3dDescriptor::m_PadTop
uint32_t m_PadTop
Padding top value in the height dimension.
Definition: Descriptors.hpp:479
armnn::Pooling2dDescriptor::m_PoolHeight
uint32_t m_PoolHeight
Pooling height value.
Definition: Descriptors.hpp:417
armnn::Pooling3dDescriptor
A Pooling3dDescriptor for the Pooling3dLayer.
Definition: Descriptors.hpp:431
armnn::DataLayout::NHWC
@ NHWC
armnn::TensorInfo
Definition: Tensor.hpp:152
armnn::NormalizationAlgorithmMethod::LocalBrightness
@ LocalBrightness
Krichevsky 2012: Local Brightness Normalization.
armnn::NormalizationDescriptor::m_Beta
float m_Beta
Beta value for the normalization equation.
Definition: Descriptors.hpp:801
armnn::NormalizationDescriptor
A NormalizationDescriptor for the NormalizationLayer.
Definition: Descriptors.hpp:769
armnn::OutputShapeRounding::Floor
@ Floor
armnn::Pooling2dDescriptor::m_StrideY
uint32_t m_StrideY
Stride value when proceeding through input for the height dimension.
Definition: Descriptors.hpp:421
CHECK_LOCATION
#define CHECK_LOCATION()
Definition: Exceptions.hpp:203
armnn::Pooling2dDescriptor::m_PadTop
uint32_t m_PadTop
Padding top value in the height dimension.
Definition: Descriptors.hpp:411
CHECK_LAYERS
#define CHECK_LAYERS(GRAPH, LAYERS_INDEX, LAYER_INDEX)
Definition: Deserializer.cpp:181
armnn::PoolingAlgorithm::L2
@ L2
armnn::QLstmDescriptor::m_InputIntermediateScale
float m_InputIntermediateScale
Input intermediate quantization scale.
Definition: Descriptors.hpp:1426
armnn::Pooling3dDescriptor::m_StrideZ
uint32_t m_StrideZ
Stride value when proceeding through input for the depth dimension.
Definition: Descriptors.hpp:497
armnn::NormalizationDescriptor::m_NormSize
uint32_t m_NormSize
Depth radius value.
Definition: Descriptors.hpp:797
armnn::Pooling2dDescriptor::m_PoolWidth
uint32_t m_PoolWidth
Pooling width value.
Definition: Descriptors.hpp:415
armnn::Pooling3dDescriptor::m_DataLayout
DataLayout m_DataLayout
The data layout to be used (NCDHW, NDHWC).
Definition: Descriptors.hpp:503
armnn::Pooling3dDescriptor::m_PadBottom
uint32_t m_PadBottom
Padding bottom value in the height dimension.
Definition: Descriptors.hpp:481
armnn::QLstmDescriptor::m_CellIntermediateScale
float m_CellIntermediateScale
Cell intermediate quantization scale.
Definition: Descriptors.hpp:1430
armnn::NormalizationDescriptor::m_NormMethodType
NormalizationAlgorithmMethod m_NormMethodType
Normalization method algorithm to use (LocalBrightness, LocalContrast).
Definition: Descriptors.hpp:795
armnn::Pooling3dDescriptor::m_StrideY
uint32_t m_StrideY
Stride value when proceeding through input for the height dimension.
Definition: Descriptors.hpp:495
armnn::NormalizationAlgorithmChannel::Across
@ Across
ARMNN_LOG
#define ARMNN_LOG(severity)
Definition: Logging.hpp:212
armnn::DataLayout::NDHWC
@ NDHWC
armnn::Pooling3dDescriptor::m_PoolType
PoolingAlgorithm m_PoolType
The pooling algorithm to use (Max. Average, L2).
Definition: Descriptors.hpp:473
CHECKED_NON_NEGATIVE
#define CHECKED_NON_NEGATIVE(VALUE)
Definition: VerificationHelpers.hpp:35
armnn::LstmDescriptor::m_PeepholeEnabled
bool m_PeepholeEnabled
Enable/disable peephole.
Definition: Descriptors.hpp:1148
armnn::TensorShape
Definition: Tensor.hpp:20
armnn::NormalizationDescriptor::m_NormChannelType
NormalizationAlgorithmChannel m_NormChannelType
Normalization channel algorithm to use (Across, Within).
Definition: Descriptors.hpp:793
armnn::LstmDescriptor::m_ClippingThresProj
float m_ClippingThresProj
Clipping threshold value for the projection.
Definition: Descriptors.hpp:1144
armnn::Pooling3dDescriptor::m_PoolWidth
uint32_t m_PoolWidth
Pooling width value.
Definition: Descriptors.hpp:487
armnn::Pooling2dDescriptor::m_DataLayout
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
Definition: Descriptors.hpp:427
armnn::Pooling2dDescriptor::m_PadBottom
uint32_t m_PadBottom
Padding bottom value in the height dimension.
Definition: Descriptors.hpp:413
armnn::Pooling3dDescriptor::m_PaddingMethod
PaddingMethod m_PaddingMethod
The padding method to be used. (Exclude, IgnoreValue).
Definition: Descriptors.hpp:501
armnn::Pooling2dDescriptor::m_PadRight
uint32_t m_PadRight
Padding right value in the width dimension.
Definition: Descriptors.hpp:409
armnn::PaddingMethod::Exclude
@ Exclude
The padding fields don't count and are ignored.
armnn::PaddingMethod::IgnoreValue
@ IgnoreValue
The padding fields count, but are ignored.
armnn::InvalidArgumentException
Definition: Exceptions.hpp:80
armnn::NormalizationDescriptor::m_DataLayout
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
Definition: Descriptors.hpp:805
armnn::QLstmDescriptor::m_ProjectionClip
float m_ProjectionClip
Clipping threshold value for the projection.
Definition: Descriptors.hpp:1416
armnnDeserializer::TensorRawPtrVector
std::vector< TensorRawPtr > TensorRawPtrVector
Definition: Deserializer.hpp:28
armnn::Pooling2dDescriptor::m_PadLeft
uint32_t m_PadLeft
Padding left value in the width dimension.
Definition: Descriptors.hpp:407
armnn::Pooling3dDescriptor::m_PadFront
uint32_t m_PadFront
Padding front value in the depth dimension.
Definition: Descriptors.hpp:483
armnn::QLstmDescriptor::m_OutputIntermediateScale
float m_OutputIntermediateScale
Output intermediate quantization scale.
Definition: Descriptors.hpp:1432
armnn::PoolingAlgorithm::Average
@ Average
armnnDeserializer::IDeserializer::DeserializerImpl::LoadGraphFromBinary
static GraphPtr LoadGraphFromBinary(const uint8_t *binaryContent, size_t len)
Definition: Deserializer.cpp:877
armnn::Pooling3dDescriptor::m_PadRight
uint32_t m_PadRight
Padding right value in the width dimension.
Definition: Descriptors.hpp:477
armnn::Pooling2dDescriptor::m_StrideX
uint32_t m_StrideX
Stride value when proceeding through input for the width dimension.
Definition: Descriptors.hpp:419
armnn::Pooling3dDescriptor::m_PoolHeight
uint32_t m_PoolHeight
Pooling height value.
Definition: Descriptors.hpp:489
armnn::LstmDescriptor
An LstmDescriptor for the LstmLayer.
Definition: Descriptors.hpp:1102
armnn::Pooling3dDescriptor::m_PadBack
uint32_t m_PadBack
Padding back value in the depth dimension.
Definition: Descriptors.hpp:485
armnn::LstmDescriptor::m_CifgEnabled
bool m_CifgEnabled
Enable/disable cifg (coupled input & forget gate).
Definition: Descriptors.hpp:1146
armnn::NormalizationDescriptor::m_Alpha
float m_Alpha
Alpha value for the normalization equation.
Definition: Descriptors.hpp:799
armnn::Pooling3dDescriptor::m_StrideX
uint32_t m_StrideX
Stride value when proceeding through input for the width dimension.
Definition: Descriptors.hpp:493
armnn::Pooling3dDescriptor::m_PadLeft
uint32_t m_PadLeft
Padding left value in the width dimension.
Definition: Descriptors.hpp:475
armnn::QLstmDescriptor::m_HiddenStateZeroPoint
int32_t m_HiddenStateZeroPoint
Hidden State zero point.
Definition: Descriptors.hpp:1434
armnn::ParseException
Definition: Exceptions.hpp:92
armnn::LstmDescriptor::m_LayerNormEnabled
bool m_LayerNormEnabled
Enable/disable layer normalization.
Definition: Descriptors.hpp:1152
armnn::IgnoreUnused
void IgnoreUnused(Ts &&...)
Definition: IgnoreUnused.hpp:14
armnn::QLstmDescriptor::m_CifgEnabled
bool m_CifgEnabled
Enable/disable CIFG (coupled input & forget gate).
Definition: Descriptors.hpp:1418
armnn::TensorInfo::SetShape
void SetShape(const TensorShape &newShape)
Definition: Tensor.hpp:195
armnn::PoolingAlgorithm::Max
@ Max
armnn::QLstmDescriptor::m_HiddenStateScale
float m_HiddenStateScale
Hidden State quantization scale.
Definition: Descriptors.hpp:1436
armnn::NormalizationDescriptor::m_K
float m_K
Kappa value used for the across channel normalization equation.
Definition: Descriptors.hpp:803
armnn::LstmDescriptor::m_ProjectionEnabled
bool m_ProjectionEnabled
Enable/disable the projection layer.
Definition: Descriptors.hpp:1150
armnnDeserializer::IDeserializer::DeserializerImpl::GetBaseLayer
static LayerBaseRawPtr GetBaseLayer(const GraphPtr &graphPtr, unsigned int layerIndex)
Definition: Deserializer.cpp:285
armnn::Pooling2dDescriptor::m_OutputShapeRounding
OutputShapeRounding m_OutputShapeRounding
The rounding method for the output shape. (Floor, Ceiling).
Definition: Descriptors.hpp:423
armnn::QLstmDescriptor::m_CellClip
float m_CellClip
Clipping threshold value for the cell state.
Definition: Descriptors.hpp:1414
armnn::QLstmDescriptor::m_LayerNormEnabled
bool m_LayerNormEnabled
Enable/disable layer normalization.
Definition: Descriptors.hpp:1424
armnn::OutputShapeRounding::Ceiling
@ Ceiling
armnn::Pooling2dDescriptor
A Pooling2dDescriptor for the Pooling2dLayer.
Definition: Descriptors.hpp:371
armnn::LstmDescriptor::m_ActivationFunc
uint32_t m_ActivationFunc
The activation function to use.
Definition: Descriptors.hpp:1140
armnn::LstmDescriptor::m_ClippingThresCell
float m_ClippingThresCell
Clipping threshold value for the cell state.
Definition: Descriptors.hpp:1142
armnn::NormalizationAlgorithmMethod::LocalContrast
@ LocalContrast
Jarret 2009: Local Contrast Normalization.
armnn::Pooling3dDescriptor::m_PoolDepth
uint32_t m_PoolDepth
Pooling depth value.
Definition: Descriptors.hpp:491
armnn::QLstmDescriptor::m_PeepholeEnabled
bool m_PeepholeEnabled
Enable/disable peephole.
Definition: Descriptors.hpp:1420
armnn::Pooling2dDescriptor::m_PoolType
PoolingAlgorithm m_PoolType
The pooling algorithm to use (Max. Average, L2).
Definition: Descriptors.hpp:405
armnn::DataLayout::NCHW
@ NCHW
armnnDeserializer::GraphPtr
const armnnSerializer::SerializedGraph * GraphPtr
Definition: Deserializer.hpp:19