ArmNN
 23.08
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 852 of file Deserializer.cpp.

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

◆ CreateNetworkFromBinary() [2/2]

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

Create an input network from a binary input stream.

Definition at line 859 of file Deserializer.cpp.

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

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 801 of file Deserializer.cpp.

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

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 3245 of file Deserializer.cpp.

3246 {
3247  armnn::LstmDescriptor desc;
3248 
3249  desc.m_ActivationFunc = lstmDescriptor->activationFunc();
3250  desc.m_ClippingThresCell = lstmDescriptor->clippingThresCell();
3251  desc.m_ClippingThresProj = lstmDescriptor->clippingThresProj();
3252  desc.m_CifgEnabled = lstmDescriptor->cifgEnabled();
3253  desc.m_PeepholeEnabled = lstmDescriptor->peepholeEnabled();
3254  desc.m_ProjectionEnabled = lstmDescriptor->projectionEnabled();
3255  desc.m_LayerNormEnabled = lstmDescriptor->layerNormEnabled();
3256 
3257  return desc;
3258 }

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 934 of file Deserializer.cpp.

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

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 950 of file Deserializer.cpp.

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

References CHECK_LOCATION, and armnn::IgnoreUnused().

◆ GetNormalizationDescriptor()

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

Definition at line 2915 of file Deserializer.cpp.

2918 {
2919  IgnoreUnused(layerIndex);
2921 
2922  switch (normalizationDescriptor->normChannelType())
2923  {
2924  case NormalizationAlgorithmChannel_Across:
2925  {
2927  break;
2928  }
2929  case NormalizationAlgorithmChannel_Within:
2930  {
2932  break;
2933  }
2934  default:
2935  {
2936  ARMNN_ASSERT_MSG(false, "Unsupported normalization channel type");
2937  }
2938  }
2939 
2940  switch (normalizationDescriptor->normMethodType())
2941  {
2942  case NormalizationAlgorithmMethod_LocalBrightness:
2943  {
2945  break;
2946  }
2947  case NormalizationAlgorithmMethod_LocalContrast:
2948  {
2950  break;
2951  }
2952  default:
2953  {
2954  ARMNN_ASSERT_MSG(false, "Unsupported normalization method type");
2955  }
2956  }
2957 
2958  switch (normalizationDescriptor->dataLayout())
2959  {
2960  case DataLayout_NCHW:
2961  {
2963  break;
2964  }
2965  case DataLayout_NHWC:
2966  {
2968  break;
2969  }
2970  default:
2971  {
2972  ARMNN_ASSERT_MSG(false, "Unsupported data layout");
2973  }
2974  }
2975 
2976  desc.m_Alpha = normalizationDescriptor->alpha();
2977  desc.m_Beta = normalizationDescriptor->beta();
2978  desc.m_K = normalizationDescriptor->k();
2979  desc.m_NormSize = normalizationDescriptor->normSize();
2980 
2981  return desc;
2982 }

References armnn::Across, ARMNN_ASSERT_MSG, 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 818 of file Deserializer.cpp.

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

References CHECK_LAYERS.

◆ GetPooling2dDescriptor()

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

Definition at line 2342 of file Deserializer.cpp.

2344 {
2345  IgnoreUnused(layerIndex);
2347 
2348  switch (pooling2dDesc->poolType())
2349  {
2350  case PoolingAlgorithm_Average:
2351  {
2353  break;
2354  }
2355  case PoolingAlgorithm_Max:
2356  {
2358  break;
2359  }
2360  case PoolingAlgorithm_L2:
2361  {
2363  break;
2364  }
2365  default:
2366  {
2367  ARMNN_ASSERT_MSG(false, "Unsupported pooling algorithm");
2368  }
2369  }
2370 
2371  switch (pooling2dDesc->outputShapeRounding())
2372  {
2373  case OutputShapeRounding_Floor:
2374  {
2376  break;
2377  }
2378  case OutputShapeRounding_Ceiling:
2379  {
2381  break;
2382  }
2383  default:
2384  {
2385  ARMNN_ASSERT_MSG(false, "Unsupported output shape rounding");
2386  }
2387  }
2388 
2389  switch (pooling2dDesc->paddingMethod())
2390  {
2391  case PaddingMethod_Exclude:
2392  {
2394  break;
2395  }
2396  case PaddingMethod_IgnoreValue:
2397  {
2399  break;
2400  }
2401  default:
2402  {
2403  ARMNN_ASSERT_MSG(false, "Unsupported padding method");
2404  }
2405  }
2406 
2407  switch (pooling2dDesc->dataLayout())
2408  {
2409  case DataLayout_NCHW:
2410  {
2412  break;
2413  }
2414  case DataLayout_NHWC:
2415  {
2417  break;
2418  }
2419  default:
2420  {
2421  ARMNN_ASSERT_MSG(false, "Unsupported data layout");
2422  }
2423  }
2424 
2425  desc.m_PadRight = pooling2dDesc->padRight();
2426  desc.m_PadLeft = pooling2dDesc->padLeft();
2427  desc.m_PadBottom = pooling2dDesc->padBottom();
2428  desc.m_PadTop = pooling2dDesc->padTop();
2429  desc.m_StrideX = pooling2dDesc->strideX();
2430  desc.m_StrideY = pooling2dDesc->strideY();
2431  desc.m_PoolWidth = pooling2dDesc->poolWidth();
2432  desc.m_PoolHeight = pooling2dDesc->poolHeight();
2433 
2434  return desc;
2435 }

References ARMNN_ASSERT_MSG, 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 2437 of file Deserializer.cpp.

2439 {
2440  IgnoreUnused(layerIndex);
2442 
2443  switch (pooling3dDesc->poolType())
2444  {
2445  case PoolingAlgorithm_Average:
2446  {
2448  break;
2449  }
2450  case PoolingAlgorithm_Max:
2451  {
2453  break;
2454  }
2455  case PoolingAlgorithm_L2:
2456  {
2458  break;
2459  }
2460  default:
2461  {
2462  ARMNN_ASSERT_MSG(false, "Unsupported pooling algorithm");
2463  }
2464  }
2465 
2466  switch (pooling3dDesc->outputShapeRounding())
2467  {
2468  case OutputShapeRounding_Floor:
2469  {
2471  break;
2472  }
2473  case OutputShapeRounding_Ceiling:
2474  {
2476  break;
2477  }
2478  default:
2479  {
2480  ARMNN_ASSERT_MSG(false, "Unsupported output shape rounding");
2481  }
2482  }
2483 
2484  switch (pooling3dDesc->paddingMethod())
2485  {
2486  case PaddingMethod_Exclude:
2487  {
2489  break;
2490  }
2491  case PaddingMethod_IgnoreValue:
2492  {
2494  break;
2495  }
2496  default:
2497  {
2498  ARMNN_ASSERT_MSG(false, "Unsupported padding method");
2499  }
2500  }
2501 
2502  switch (pooling3dDesc->dataLayout())
2503  {
2504  case DataLayout_NCDHW:
2505  {
2507  break;
2508  }
2509  case DataLayout_NDHWC:
2510  {
2512  break;
2513  }
2514  default:
2515  {
2516  ARMNN_ASSERT_MSG(false, "Unsupported data layout");
2517  }
2518  }
2519 
2520  desc.m_PadRight = pooling3dDesc->padRight();
2521  desc.m_PadLeft = pooling3dDesc->padLeft();
2522  desc.m_PadBottom = pooling3dDesc->padBottom();
2523  desc.m_PadTop = pooling3dDesc->padTop();
2524  desc.m_PadFront = pooling3dDesc->padFront();
2525  desc.m_PadBack = pooling3dDesc->padBack();
2526  desc.m_StrideX = pooling3dDesc->strideX();
2527  desc.m_StrideY = pooling3dDesc->strideY();
2528  desc.m_StrideZ = pooling3dDesc->strideZ();
2529  desc.m_PoolWidth = pooling3dDesc->poolWidth();
2530  desc.m_PoolHeight = pooling3dDesc->poolHeight();
2531  desc.m_PoolDepth = pooling3dDesc->poolDepth();
2532 
2533  return desc;
2534 }

References ARMNN_ASSERT_MSG, 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 3376 of file Deserializer.cpp.

3377 {
3379 
3380  desc.m_CifgEnabled = qLstmDescriptor->cifgEnabled();
3381  desc.m_PeepholeEnabled = qLstmDescriptor->peepholeEnabled();
3382  desc.m_ProjectionEnabled = qLstmDescriptor->projectionEnabled();
3383  desc.m_LayerNormEnabled = qLstmDescriptor->layerNormEnabled();
3384 
3385  desc.m_CellClip = qLstmDescriptor->cellClip();
3386  desc.m_ProjectionClip = qLstmDescriptor->projectionClip();
3387 
3388  desc.m_InputIntermediateScale = qLstmDescriptor->inputIntermediateScale();
3389  desc.m_ForgetIntermediateScale = qLstmDescriptor->forgetIntermediateScale();
3390  desc.m_CellIntermediateScale = qLstmDescriptor->cellIntermediateScale();
3391  desc.m_OutputIntermediateScale = qLstmDescriptor->outputIntermediateScale();
3392 
3393  desc.m_HiddenStateScale = qLstmDescriptor->hiddenStateScale();
3394  desc.m_HiddenStateZeroPoint = qLstmDescriptor->hiddenStateZeroPoint();
3395 
3396  return desc;
3397 }

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 3835 of file Deserializer.cpp.

3837 {
3839 
3840  desc.m_ActivationFunc = descriptor->activationFunc();
3841  desc.m_ClippingThresCell = descriptor->clippingThresCell();
3842  desc.m_ClippingThresProj = descriptor->clippingThresProj();
3843  desc.m_CifgEnabled = descriptor->cifgEnabled();
3844  desc.m_PeepholeEnabled = descriptor->peepholeEnabled();
3845  desc.m_ProjectionEnabled = descriptor->projectionEnabled();
3846  desc.m_LayerNormEnabled = descriptor->layerNormEnabled();
3847  desc.m_TimeMajor = descriptor->timeMajor();
3848 
3849  return desc;
3850 }

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 875 of file Deserializer.cpp.

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

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 2597 of file Deserializer.cpp.

2599 {
2600  std::vector<unsigned int> outputDims(targetDimsIn.begin(), targetDimsIn.end());
2601  const auto stretchDim = std::find(targetDimsIn.begin(), targetDimsIn.end(), -1);
2602 
2603  if (stretchDim != targetDimsIn.end())
2604  {
2605  if (std::find(std::next(stretchDim), targetDimsIn.end(), -1) != targetDimsIn.end())
2606  {
2607  throw ParseException(fmt::format("At most one component of shape can be -1 {}",
2608  CHECK_LOCATION().AsString()));
2609  }
2610 
2611  auto targetNumElements =
2612  armnn::numeric_cast<unsigned int>(
2613  std::accumulate(targetDimsIn.begin(), targetDimsIn.end(), -1, std::multiplies<int32_t>()));
2614 
2615  auto stretchIndex = static_cast<size_t>(std::distance(targetDimsIn.begin(), stretchDim));
2616  outputDims[stretchIndex] = inputTensorInfo.GetNumElements() / targetNumElements;
2617  }
2618 
2619  TensorShape outputShape = TensorShape(static_cast<unsigned int>(outputDims.size()), outputDims.data());
2620 
2621  armnn::TensorInfo reshapeInfo = inputTensorInfo;
2622  reshapeInfo.SetShape(outputShape);
2623 
2624  return reshapeInfo;
2625 }

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:196
armnn::QLstmDescriptor::m_ForgetIntermediateScale
float m_ForgetIntermediateScale
Forget intermediate quantization scale.
Definition: Descriptors.hpp:1407
armnn::NormalizationAlgorithmChannel::Within
@ Within
armnn::QLstmDescriptor
A QLstmDescriptor for the QLstmLayer.
Definition: Descriptors.hpp:1359
armnn::DataLayout::NCDHW
@ NCDHW
armnn::QLstmDescriptor::m_ProjectionEnabled
bool m_ProjectionEnabled
Enable/disable the projection layer.
Definition: Descriptors.hpp:1401
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:1133
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:1405
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_ASSERT_MSG
#define ARMNN_ASSERT_MSG(COND, MSG)
Definition: Assert.hpp:15
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:1409
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:1127
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:1123
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:1395
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:1411
armnn::PoolingAlgorithm::Average
@ Average
armnnDeserializer::IDeserializer::DeserializerImpl::LoadGraphFromBinary
static GraphPtr LoadGraphFromBinary(const uint8_t *binaryContent, size_t len)
Definition: Deserializer.cpp:875
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:1081
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:1125
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:1413
armnn::ParseException
Definition: Exceptions.hpp:92
armnn::LstmDescriptor::m_LayerNormEnabled
bool m_LayerNormEnabled
Enable/disable layer normalization.
Definition: Descriptors.hpp:1131
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:1397
armnn::TensorInfo::SetShape
void SetShape(const TensorShape &newShape)
Definition: Tensor.hpp:193
armnn::PoolingAlgorithm::Max
@ Max
armnn::QLstmDescriptor::m_HiddenStateScale
float m_HiddenStateScale
Hidden State quantization scale.
Definition: Descriptors.hpp:1415
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:1129
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:1393
armnn::QLstmDescriptor::m_LayerNormEnabled
bool m_LayerNormEnabled
Enable/disable layer normalization.
Definition: Descriptors.hpp:1403
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:1119
armnn::LstmDescriptor::m_ClippingThresCell
float m_ClippingThresCell
Clipping threshold value for the cell state.
Definition: Descriptors.hpp:1121
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:1399
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