ArmNN
 22.05
RedirectMembersToConstantInputsImpl Class Reference

#include <RedirectMembersToConstantInputs.hpp>

Public Member Functions

void Run (Graph &graph, Layer &layer) const
 Search for layers with ConstantLayers as inputs. More...
 

Protected Member Functions

 RedirectMembersToConstantInputsImpl ()=default
 
 ~RedirectMembersToConstantInputsImpl ()=default
 

Detailed Description

Definition at line 18 of file RedirectMembersToConstantInputs.hpp.

Constructor & Destructor Documentation

◆ RedirectMembersToConstantInputsImpl()

◆ ~RedirectMembersToConstantInputsImpl()

Member Function Documentation

◆ Run()

void Run ( Graph graph,
Layer layer 
) const
inline

Search for layers with ConstantLayers as inputs.

If the inputs are constant redirect the layers member variable for ConstTensors (e.g. m_weights) to the data stored in the ConstantLayer it is connected to.

Definition at line 23 of file RedirectMembersToConstantInputs.hpp.

References armnn::BatchNormalization, armnn::Constant, armnn::Convolution2d, armnn::DepthwiseConvolution2d, armnn::DetectionPostProcess, armnn::FullyConnected, OutputSlot::GetOwningLayer(), Layer::GetType(), armnn::IgnoreUnused(), armnn::Lstm, ConstantLayer::m_LayerOutput, RedirectMembersToConstantInputsImpl::RedirectMembersToConstantInputsImpl(), armnn::TransposeConvolution2d, and RedirectMembersToConstantInputsImpl::~RedirectMembersToConstantInputsImpl().

24  {
25  IgnoreUnused(graph);
26 
27  switch (layer.GetType())
28  {
30  break;
32  RedirectWeightsAndBiases<Convolution2dLayer>(&layer);
33  break;
35  RedirectWeightsAndBiases<DepthwiseConvolution2dLayer>(&layer);
36  break;
38  break;
40  RedirectWeightsAndBiases<FullyConnectedLayer>(&layer);
41  break;
42  case LayerType::Lstm:
43  break;
45  break;
46  default:
47  break;
48  }
49  }
void IgnoreUnused(Ts &&...)

The documentation for this class was generated from the following file: