ArmNN
 21.08
INetwork Class Reference

Main network class which provides the interface for building up a neural network. More...

#include <INetwork.hpp>

Public Member Functions

Status PrintGraph ()
 
IConnectableLayerAddInputLayer (LayerBindingId id, const char *name=nullptr)
 Adds an input layer to the network. More...
 
IConnectableLayerAddArgMinMaxLayer (const ArgMinMaxDescriptor &desc, const char *name=nullptr)
 Adds an ArgMinMax layer to the network. More...
 
IConnectableLayerAddCastLayer (const char *name=nullptr)
 Adds a cast layer to the network. More...
 
IConnectableLayerAddComparisonLayer (const ComparisonDescriptor &comparisonDescriptor, const char *name=nullptr)
 Add a Comparison layer to the network. More...
 
IConnectableLayerAddConcatLayer (const ConcatDescriptor &concatDescriptor, const char *name=nullptr)
 Adds a concatenation layer to the network. More...
 
IConnectableLayerAddConvolution2dLayer (const Convolution2dDescriptor &convolution2dDescriptor, const ConstTensor &weights, const Optional< ConstTensor > &biases, const char *name=nullptr)
 Adds a 2D convolution layer to the network. More...
 
IConnectableLayerAddConvolution2dLayer (const Convolution2dDescriptor &convolution2dDescriptor, const ConstTensor &weights, const char *name=nullptr)
 
IConnectableLayerAddConvolution2dLayer (const Convolution2dDescriptor &convolution2dDescriptor, const ConstTensor &weights, const ConstTensor &biases, const char *name=nullptr)
 
IConnectableLayerAddDepthToSpaceLayer (const DepthToSpaceDescriptor &depthToSpaceDescriptor, const char *name=nullptr)
 Adds a depth to space layer to the network. More...
 
IConnectableLayerAddDepthwiseConvolution2dLayer (const DepthwiseConvolution2dDescriptor &convolution2dDescriptor, const ConstTensor &weights, const Optional< ConstTensor > &biases, const char *name=nullptr)
 Adds a 2D depthwise convolution layer to the network. More...
 
IConnectableLayerAddDepthwiseConvolution2dLayer (const DepthwiseConvolution2dDescriptor &convolution2dDescriptor, const ConstTensor &weights, const char *name=nullptr)
 
IConnectableLayerAddDepthwiseConvolution2dLayer (const DepthwiseConvolution2dDescriptor &convolution2dDescriptor, const ConstTensor &weights, const ConstTensor &biases, const char *name=nullptr)
 
IConnectableLayerAddDequantizeLayer (const char *name=nullptr)
 Adds a Dequantize layer to the network. More...
 
IConnectableLayerAddDetectionPostProcessLayer (const DetectionPostProcessDescriptor &descriptor, const ConstTensor &anchors, const char *name=nullptr)
 Adds a Detection PostProcess layer to the network. More...
 
IConnectableLayerAddElementwiseUnaryLayer (const ElementwiseUnaryDescriptor &elementwiseUnaryDescriptor, const char *name=nullptr)
 Add an ElementwiseUnary layer to the network. More...
 
IConnectableLayerAddFillLayer (const FillDescriptor &fillDescriptor, const char *name=nullptr)
 Add an Fill layer to the network. More...
 
IConnectableLayerAddFullyConnectedLayer (const FullyConnectedDescriptor &fullyConnectedDescriptor, const char *name=nullptr)
 Adds a fully connected layer to the network. More...
 
IConnectableLayerAddFullyConnectedLayer (const FullyConnectedDescriptor &fullyConnectedDescriptor, const Optional< ConstTensor > &weights, const Optional< ConstTensor > &biases, const char *name=nullptr)
 
IConnectableLayerAddFullyConnectedLayer (const FullyConnectedDescriptor &fullyConnectedDescriptor, const ConstTensor &weights, const Optional< ConstTensor > &biases, const char *name=nullptr)
 
IConnectableLayerAddPermuteLayer (const PermuteDescriptor &permuteDescriptor, const char *name=nullptr)
 Adds a permute layer to the network. More...
 
IConnectableLayerAddBatchToSpaceNdLayer (const BatchToSpaceNdDescriptor &batchToSpaceNdDescriptor, const char *name=nullptr)
 Adds a batch to space ND layer to the network. More...
 
IConnectableLayerAddPooling2dLayer (const Pooling2dDescriptor &pooling2dDescriptor, const char *name=nullptr)
 Adds a pooling layer to the network. More...
 
IConnectableLayerAddActivationLayer (const ActivationDescriptor &activationDescriptor, const char *name=nullptr)
 Adds an activation layer to the network. More...
 
IConnectableLayerAddNormalizationLayer (const NormalizationDescriptor &normalizationDescriptor, const char *name=nullptr)
 Adds a normalization layer to the network. More...
 
IConnectableLayerAddSliceLayer (const SliceDescriptor &sliceDescriptor, const char *name=nullptr)
 Adds a slice layer to the network. More...
 
IConnectableLayerAddSoftmaxLayer (const SoftmaxDescriptor &softmaxDescriptor, const char *name=nullptr)
 Adds a softmax layer to the network. More...
 
IConnectableLayerAddSplitterLayer (const ViewsDescriptor &splitterDescriptor, const char *name=nullptr)
 Adds a splitter layer to the network. More...
 
IConnectableLayerAddMergeLayer (const char *name=nullptr)
 Adds a merge layer to the network. More...
 
IConnectableLayerAddMergerLayer (const MergerDescriptor &mergerDescriptor, const char *name=nullptr)
 Adds a concat layer to the network. More...
 
IConnectableLayerAddAbsLayer (const char *name=nullptr)
 Add absolute layer to the network. More...
 
IConnectableLayerAddAdditionLayer (const char *name=nullptr)
 Adds an addition layer to the network. More...
 
IConnectableLayerAddMultiplicationLayer (const char *name=nullptr)
 Adds a multiplication layer to the network. More...
 
IConnectableLayerAddBatchNormalizationLayer (const BatchNormalizationDescriptor &desc, const ConstTensor &mean, const ConstTensor &variance, const ConstTensor &beta, const ConstTensor &gamma, const char *name=nullptr)
 Adds a batch normalization layer to the network. More...
 
IConnectableLayerAddRankLayer (const char *name=nullptr)
 Adds a rank layer to the network. More...
 
IConnectableLayerAddResizeBilinearLayer (const ResizeBilinearDescriptor &resizeDesc, const char *name=nullptr)
 Adds a resize bilinear layer to the network. More...
 
IConnectableLayerAddResizeLayer (const ResizeDescriptor &resizeDescriptor, const char *name=nullptr)
 Adds a resize layer to the network. More...
 
IConnectableLayerAddReduceLayer (const ReduceDescriptor &reduceDescriptor, const char *name=nullptr)
 Adds a reduce layer to the network. More...
 
IConnectableLayerAddInstanceNormalizationLayer (const InstanceNormalizationDescriptor &desc, const char *name=nullptr)
 Adds an instance normalization layer to the network. More...
 
IConnectableLayerAddL2NormalizationLayer (const L2NormalizationDescriptor &desc, const char *name=nullptr)
 Adds an L2 normalization layer to the network. More...
 
IConnectableLayerAddLogSoftmaxLayer (const LogSoftmaxDescriptor &logSoftmaxDescriptor, const char *name=nullptr)
 Adds a log softmax layer to the network. More...
 
IConnectableLayerAddConstantLayer (const ConstTensor &input, const char *name=nullptr)
 Adds a layer with no inputs and a single output, which always corresponds to the passed in constant tensor. More...
 
IConnectableLayerAddReshapeLayer (const ReshapeDescriptor &reshapeDescriptor, const char *name=nullptr)
 Adds a reshape layer to the network. More...
 
IConnectableLayerAddShapeLayer (const char *name=nullptr)
 Adds a shape layer to the network. More...
 
IConnectableLayerAddSpaceToBatchNdLayer (const SpaceToBatchNdDescriptor &spaceToBatchNdDescriptor, const char *name=nullptr)
 Adds a space to batch layer to the network. More...
 
IConnectableLayerAddSpaceToDepthLayer (const SpaceToDepthDescriptor &spaceToDepthDescriptor, const char *name=nullptr)
 Adds a space to depth layer to the network. More...
 
IConnectableLayerAddFloorLayer (const char *name=nullptr)
 Adds a floor layer to the network. More...
 
IConnectableLayerAddOutputLayer (LayerBindingId id, const char *name=nullptr)
 Adds an output layer to the network. More...
 
IConnectableLayerAddLstmLayer (const LstmDescriptor &descriptor, const LstmInputParams &params, const char *name=nullptr)
 Add a Lstm layer to the network. More...
 
IConnectableLayerAddDivisionLayer (const char *name=nullptr)
 Adds a division layer to the network. More...
 
IConnectableLayerAddSubtractionLayer (const char *name=nullptr)
 Adds a subtraction layer to the network. More...
 
IConnectableLayerAddMaximumLayer (const char *name=nullptr)
 Add a Maximum layer to the network. More...
 
IConnectableLayerAddMeanLayer (const MeanDescriptor &meanDescriptor, const char *name=nullptr)
 Add a Mean layer to the network. More...
 
IConnectableLayerAddPadLayer (const PadDescriptor &padDescriptor, const char *name=nullptr)
 Adds a fully pad layer to the network. More...
 
IConnectableLayerAddQuantizeLayer (const char *name=nullptr)
 Add a quantize layer to the network. More...
 
IConnectableLayerAddStridedSliceLayer (const StridedSliceDescriptor &stridedSliceDescriptor, const char *name=nullptr)
 Adds a strided slice layer to the network. More...
 
IConnectableLayerAddMinimumLayer (const char *name=nullptr)
 Add a Minimum layer to the network. More...
 
IConnectableLayerAddGreaterLayer (const char *name=nullptr)
 Add a Greater layer to the network. More...
 
IConnectableLayerAddEqualLayer (const char *name=nullptr)
 Add a Equal layer to the network. More...
 
IConnectableLayerAddRsqrtLayer (const char *name=nullptr)
 Add Reciprocal of square root layer to the network. More...
 
IConnectableLayerAddGatherLayer (const char *name=nullptr)
 Add Gather layer to the network. More...
 
IConnectableLayerAddGatherLayer (const GatherDescriptor &descriptor, const char *name=nullptr)
 Add Gather layer to the network. More...
 
IConnectableLayerAddSwitchLayer (const char *name=nullptr)
 Adds a switch layer to the network. More...
 
IConnectableLayerAddPreluLayer (const char *name=nullptr)
 Adds a PReLU layer to the network. More...
 
IConnectableLayerAddTransposeConvolution2dLayer (const TransposeConvolution2dDescriptor &descriptor, const ConstTensor &weights, const Optional< ConstTensor > &biases, const char *name=nullptr)
 Adds a 2D transpose convolution layer to the network. More...
 
IConnectableLayerAddTransposeLayer (const TransposeDescriptor &transposeDescriptor, const char *name=nullptr)
 Adds a transpose layer to the network. More...
 
IConnectableLayerAddStackLayer (const StackDescriptor &descriptor, const char *name=nullptr)
 Adds a stack layer to the network. More...
 
IConnectableLayerAddStandInLayer (const StandInDescriptor &descriptor, const char *name=nullptr)
 Add a stand-in layer for a type unknown to the Arm NN framework. More...
 
IConnectableLayerAddQuantizedLstmLayer (const QuantizedLstmInputParams &params, const char *name=nullptr)
 Add a QuantizedLstm layer to the network. More...
 
IConnectableLayerAddQLstmLayer (const QLstmDescriptor &descriptor, const LstmInputParams &params, const char *name=nullptr)
 Add a QLstm layer to the network. More...
 
IConnectableLayerAddLogicalBinaryLayer (const LogicalBinaryDescriptor &descriptor, const char *name=nullptr)
 Adds a Logical Binary layer to the network. More...
 
IConnectableLayerAddUnidirectionalSequenceLstmLayer (const UnidirectionalSequenceLstmDescriptor &descriptor, const LstmInputParams &params, const char *name=nullptr)
 Add a UnidirectionalSequenceLstm layer to the network. More...
 
void Accept (ILayerVisitor &visitor) const
 
void ExecuteStrategy (IStrategy &strategy) const
 

Static Public Member Functions

static INetworkCreateRaw (NetworkOptions networkOptions={})
 
static INetworkPtr Create (NetworkOptions networkOptions={})
 
static void Destroy (INetwork *network)
 

Protected Member Functions

 ~INetwork ()
 
 INetwork (NetworkOptions networkOptions={})
 

Protected Attributes

std::unique_ptr< NetworkImplpNetworkImpl
 

Friends

class TestConnectionPreservation
 
void VisitLayersTopologically (const INetwork *inputNetwork, IStrategy &strategy)
 
TensorInfo GetInputTensorInfo (const INetwork *network)
 
IOptimizedNetworkPtr Optimize (const INetwork &network, const std::vector< BackendId > &backendPreferences, const IDeviceSpec &deviceSpec, const OptimizerOptions &options, Optional< std::vector< std::string > &> messages)
 Create an optimized version of the network. More...
 

Detailed Description

Main network class which provides the interface for building up a neural network.

This object is subsequently required by the IRuntime::Load() method.

Definition at line 177 of file INetwork.hpp.

Constructor & Destructor Documentation

◆ ~INetwork()

~INetwork ( )
protecteddefault

Referenced by INetwork::INetwork().

◆ INetwork()

INetwork ( NetworkOptions  networkOptions = {})
protected

Definition at line 45 of file Network.cpp.

References INetwork::~INetwork().

Referenced by INetwork::CreateRaw().

45 : pNetworkImpl(new NetworkImpl(networkOptions)) {}
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

Member Function Documentation

◆ Accept()

void Accept ( ILayerVisitor visitor) const

Definition at line 515 of file Network.cpp.

References INetwork::pNetworkImpl.

516 {
517  return pNetworkImpl->Accept(visitor);
518 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddAbsLayer()

IConnectableLayer * AddAbsLayer ( const char *  name = nullptr)

Add absolute layer to the network.

Parameters
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 264 of file Network.cpp.

References armnn::Abs, and INetwork::pNetworkImpl.

265 {
266  return pNetworkImpl->AddElementwiseUnaryLayer(ElementwiseUnaryDescriptor(UnaryOperation::Abs), name);
267 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddActivationLayer()

IConnectableLayer * AddActivationLayer ( const ActivationDescriptor activationDescriptor,
const char *  name = nullptr 
)

Adds an activation layer to the network.

Parameters
activationDescriptor- ActivationDescriptor to configure the activation.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 225 of file Network.cpp.

References INetwork::pNetworkImpl.

227 {
228  return pNetworkImpl->AddActivationLayer(activationDescriptor, name);
229 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddAdditionLayer()

IConnectableLayer * AddAdditionLayer ( const char *  name = nullptr)

Adds an addition layer to the network.

Parameters
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 269 of file Network.cpp.

References INetwork::pNetworkImpl.

270 {
271  return pNetworkImpl->AddAdditionLayer(name);
272 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddArgMinMaxLayer()

IConnectableLayer * AddArgMinMaxLayer ( const ArgMinMaxDescriptor desc,
const char *  name = nullptr 
)

Adds an ArgMinMax layer to the network.

Parameters
desc- Parameters for the L2 normalization operation.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 60 of file Network.cpp.

References INetwork::pNetworkImpl.

62 {
63  return pNetworkImpl->AddArgMinMaxLayer(desc, name);
64 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddBatchNormalizationLayer()

IConnectableLayer * AddBatchNormalizationLayer ( const BatchNormalizationDescriptor desc,
const ConstTensor mean,
const ConstTensor variance,
const ConstTensor beta,
const ConstTensor gamma,
const char *  name = nullptr 
)

Adds a batch normalization layer to the network.

Parameters
mean- Pre-calculated mean for each channel.
variance- Pre-calculated variance for each channel.
beta- Per-channel additive factor.
gamma- Per-channel multiplicative factor.
Returns
- Interface for configuring the layer.
Parameters
name- Optional name for the layer.

Definition at line 279 of file Network.cpp.

References INetwork::pNetworkImpl.

285 {
286  return pNetworkImpl->AddBatchNormalizationLayer(desc, mean, variance, beta, gamma, name);
287 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddBatchToSpaceNdLayer()

IConnectableLayer * AddBatchToSpaceNdLayer ( const BatchToSpaceNdDescriptor batchToSpaceNdDescriptor,
const char *  name = nullptr 
)

Adds a batch to space ND layer to the network.

Parameters
batchToSpaceNdDescriptor- Description of the layer.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 213 of file Network.cpp.

References INetwork::pNetworkImpl.

215 {
216  return pNetworkImpl->AddBatchToSpaceNdLayer(batchToSpaceNdDescriptor, name);
217 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddCastLayer()

IConnectableLayer * AddCastLayer ( const char *  name = nullptr)

Adds a cast layer to the network.

Parameters
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 66 of file Network.cpp.

References INetwork::pNetworkImpl.

67 {
68  return pNetworkImpl->AddCastLayer(name);
69 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddComparisonLayer()

IConnectableLayer * AddComparisonLayer ( const ComparisonDescriptor comparisonDescriptor,
const char *  name = nullptr 
)

Add a Comparison layer to the network.

Parameters
name- Optional name for the layer.
desc- Descriptor for the comparison operation.
Returns
- Interface for configuring the layer.

Definition at line 71 of file Network.cpp.

References INetwork::pNetworkImpl.

73 {
74  return pNetworkImpl->AddComparisonLayer(comparisonDescriptor, name);
75 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddConcatLayer()

IConnectableLayer * AddConcatLayer ( const ConcatDescriptor concatDescriptor,
const char *  name = nullptr 
)

Adds a concatenation layer to the network.

Parameters
concatDescriptor- ConcatDescriptor (synonym for OriginsDescriptor) to configure the concatenation process. Number of Views must be equal to the number of inputs, and their order must match - e.g. first view corresponds to the first input, second view to the second input, etc....
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 78 of file Network.cpp.

References INetwork::pNetworkImpl.

80 {
81  return pNetworkImpl->AddConcatLayer(concatDescriptor, name);
82 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddConstantLayer()

IConnectableLayer * AddConstantLayer ( const ConstTensor input,
const char *  name = nullptr 
)

Adds a layer with no inputs and a single output, which always corresponds to the passed in constant tensor.

Parameters
input- Tensor to be provided as the only output of the layer. The layer will maintain its own copy of the tensor data, meaning the memory referenced by input can be freed or reused after this function is called.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 338 of file Network.cpp.

References INetwork::pNetworkImpl.

340 {
341  return pNetworkImpl->AddConstantLayer(input, name);
342 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddConvolution2dLayer() [1/3]

IConnectableLayer * AddConvolution2dLayer ( const Convolution2dDescriptor convolution2dDescriptor,
const ConstTensor weights,
const Optional< ConstTensor > &  biases,
const char *  name = nullptr 
)

Adds a 2D convolution layer to the network.

Parameters
convolution2dDescriptor- Description of the 2D convolution layer.
weights- Tensor for the weights data.
biases- Optional tensor for the bias data. If specified, must match the output tensor shape.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 85 of file Network.cpp.

References INetwork::pNetworkImpl.

Referenced by TEST_SUITE().

89 {
90  return pNetworkImpl->AddConvolution2dLayer(convolution2dDescriptor, weights, biases, name);
91 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddConvolution2dLayer() [2/3]

IConnectableLayer * AddConvolution2dLayer ( const Convolution2dDescriptor convolution2dDescriptor,
const ConstTensor weights,
const char *  name = nullptr 
)

Definition at line 94 of file Network.cpp.

References INetwork::pNetworkImpl.

97 {
98  Optional<ConstTensor> biases;
99  return pNetworkImpl->AddConvolution2dLayer(convolution2dDescriptor, weights, biases, name);
100 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddConvolution2dLayer() [3/3]

IConnectableLayer * AddConvolution2dLayer ( const Convolution2dDescriptor convolution2dDescriptor,
const ConstTensor weights,
const ConstTensor biases,
const char *  name = nullptr 
)

Definition at line 103 of file Network.cpp.

References INetwork::pNetworkImpl.

107 {
108 
109  return pNetworkImpl->AddConvolution2dLayer(convolution2dDescriptor,
110  weights,
112  name);
113 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddDepthToSpaceLayer()

IConnectableLayer * AddDepthToSpaceLayer ( const DepthToSpaceDescriptor depthToSpaceDescriptor,
const char *  name = nullptr 
)

Adds a depth to space layer to the network.

Parameters
depthToSpaceDescriptor- Parameters for the depth to space operation.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 116 of file Network.cpp.

References INetwork::pNetworkImpl.

118 {
119  return pNetworkImpl->AddDepthToSpaceLayer(depthToSpaceDescriptor, name);
120 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddDepthwiseConvolution2dLayer() [1/3]

IConnectableLayer * AddDepthwiseConvolution2dLayer ( const DepthwiseConvolution2dDescriptor convolution2dDescriptor,
const ConstTensor weights,
const Optional< ConstTensor > &  biases,
const char *  name = nullptr 
)

Adds a 2D depthwise convolution layer to the network.

Parameters
convolution2dDescriptor- Description of the 2D depthwise convolution layer.
weights- Tensor for the weights. Expected format: [channelMultiplier, inputChannels, height, width].
biasesOptional tensor for the bias data. If specified, must match the output tensor shape.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 123 of file Network.cpp.

References INetwork::pNetworkImpl.

Referenced by TEST_SUITE().

128 {
129  return pNetworkImpl->AddDepthwiseConvolution2dLayer(convolution2dDescriptor, weights, biases, name);
130 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddDepthwiseConvolution2dLayer() [2/3]

IConnectableLayer * AddDepthwiseConvolution2dLayer ( const DepthwiseConvolution2dDescriptor convolution2dDescriptor,
const ConstTensor weights,
const char *  name = nullptr 
)

Definition at line 133 of file Network.cpp.

References INetwork::pNetworkImpl.

137 {
138  Optional<ConstTensor> biases;
139  return pNetworkImpl->AddDepthwiseConvolution2dLayer(convolution2dDescriptor, weights, biases, name);
140 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddDepthwiseConvolution2dLayer() [3/3]

IConnectableLayer * AddDepthwiseConvolution2dLayer ( const DepthwiseConvolution2dDescriptor convolution2dDescriptor,
const ConstTensor weights,
const ConstTensor biases,
const char *  name = nullptr 
)

Definition at line 143 of file Network.cpp.

References INetwork::pNetworkImpl.

148 {
149  return pNetworkImpl->AddDepthwiseConvolution2dLayer(convolution2dDescriptor, weights,
150  armnn::Optional<ConstTensor>(biases), name);
151 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddDequantizeLayer()

IConnectableLayer * AddDequantizeLayer ( const char *  name = nullptr)

Adds a Dequantize layer to the network.

Returns
- Interface for configuring the layer.

Definition at line 154 of file Network.cpp.

References INetwork::pNetworkImpl.

155 {
156  return pNetworkImpl->AddDequantizeLayer(name);
157 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddDetectionPostProcessLayer()

IConnectableLayer * AddDetectionPostProcessLayer ( const DetectionPostProcessDescriptor descriptor,
const ConstTensor anchors,
const char *  name = nullptr 
)

Adds a Detection PostProcess layer to the network.

Parameters
descriptor- Description of the Detection PostProcess layer.
anchors- Tensor for anchors.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 160 of file Network.cpp.

References INetwork::pNetworkImpl.

164 {
165  return pNetworkImpl->AddDetectionPostProcessLayer(descriptor, anchors, name);
166 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddDivisionLayer()

IConnectableLayer * AddDivisionLayer ( const char *  name = nullptr)

Adds a division layer to the network.

Parameters
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 378 of file Network.cpp.

References INetwork::pNetworkImpl.

379 {
380  return pNetworkImpl->AddDivisionLayer(name);
381 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddElementwiseUnaryLayer()

IConnectableLayer * AddElementwiseUnaryLayer ( const ElementwiseUnaryDescriptor elementwiseUnaryDescriptor,
const char *  name = nullptr 
)

Add an ElementwiseUnary layer to the network.

Parameters
name- Optional name for the layer.
desc- Descriptor for the elementwiseUnary operation.
Returns
- Interface for configuring the layer.

Definition at line 169 of file Network.cpp.

References INetwork::pNetworkImpl.

171 {
172  return pNetworkImpl->AddElementwiseUnaryLayer(elementwiseUnaryDescriptor, name);
173 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddEqualLayer()

IConnectableLayer * AddEqualLayer ( const char *  name = nullptr)

Add a Equal layer to the network.

Parameters
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 425 of file Network.cpp.

References armnn::Equal, and INetwork::pNetworkImpl.

426 {
427  return pNetworkImpl->AddComparisonLayer(ComparisonDescriptor(ComparisonOperation::Equal), name);
428 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddFillLayer()

IConnectableLayer * AddFillLayer ( const FillDescriptor fillDescriptor,
const char *  name = nullptr 
)

Add an Fill layer to the network.

Parameters
name- Optional name for the layer.
fillDescriptor- Descriptor for the fill operation.
Returns
- Interface for configuring the layer.

Definition at line 176 of file Network.cpp.

References INetwork::pNetworkImpl.

178 {
179  return pNetworkImpl->AddFillLayer(fillDescriptor, name);
180 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddFloorLayer()

IConnectableLayer * AddFloorLayer ( const char *  name = nullptr)

Adds a floor layer to the network.

Parameters
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 362 of file Network.cpp.

References INetwork::pNetworkImpl.

363 {
364  return pNetworkImpl->AddFloorLayer(name);
365 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddFullyConnectedLayer() [1/3]

IConnectableLayer * AddFullyConnectedLayer ( const FullyConnectedDescriptor fullyConnectedDescriptor,
const char *  name = nullptr 
)

Adds a fully connected layer to the network.

Parameters
fullyConnectedDescriptor- Description of the fully connected layer.
Returns
- Interface for configuring the layer.
Note
Weights and biases are passed in as inputs. If they are constant tensors you can simply store them in a ConstantLayer as seen below. A full example can be found in samples/SimpleSample.cpp.
// Make sure the IsConstant flag is set on the weightsInfo before passing it to the ConstTensor.
ConstTensor weights(weightsInfo, weightsData);
// Constant layer that now holds weights data for FullyConnected
IConnectableLayer* const constantWeightsLayer = myNetwork->AddConstantLayer(weights, "weights");
FullyConnectedDescriptor fullyConnectedDesc;
IConnectableLayer* const fullyConnectedLayer = myNetwork->AddFullyConnectedLayer(fullyConnectedDesc,
"fully connected");
IConnectableLayer* InputLayer = myNetwork->AddInputLayer(0);
InputLayer->GetOutputSlot(0).Connect(fullyConnectedLayer->GetInputSlot(0));
constantWeightsLayer->GetOutputSlot(0).Connect(fullyConnectedLayer->GetInputSlot(1));

Definition at line 182 of file Network.cpp.

References INetwork::pNetworkImpl.

184 {
185  return pNetworkImpl->AddFullyConnectedLayer(fullyConnectedDescriptor, name);
186 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddFullyConnectedLayer() [2/3]

IConnectableLayer * AddFullyConnectedLayer ( const FullyConnectedDescriptor fullyConnectedDescriptor,
const Optional< ConstTensor > &  weights,
const Optional< ConstTensor > &  biases,
const char *  name = nullptr 
)

Definition at line 199 of file Network.cpp.

References INetwork::pNetworkImpl.

203 {
204  return pNetworkImpl->AddFullyConnectedLayer(fullyConnectedDescriptor, weights, biases, name);
205 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddFullyConnectedLayer() [3/3]

IConnectableLayer * AddFullyConnectedLayer ( const FullyConnectedDescriptor fullyConnectedDescriptor,
const ConstTensor weights,
const Optional< ConstTensor > &  biases,
const char *  name = nullptr 
)

Definition at line 188 of file Network.cpp.

References INetwork::pNetworkImpl.

192 {
193  return pNetworkImpl->AddFullyConnectedLayer(fullyConnectedDescriptor,
195  biases,
196  name);
197 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddGatherLayer() [1/2]

IConnectableLayer * AddGatherLayer ( const char *  name = nullptr)

Add Gather layer to the network.

Parameters
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 435 of file Network.cpp.

References INetwork::pNetworkImpl.

436 {
437  GatherDescriptor gatherDescriptor{};
438  return pNetworkImpl->AddGatherLayer(gatherDescriptor, name);
439 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddGatherLayer() [2/2]

IConnectableLayer * AddGatherLayer ( const GatherDescriptor descriptor,
const char *  name = nullptr 
)

Add Gather layer to the network.

Parameters
descriptor- Description of the gather layer.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 441 of file Network.cpp.

References INetwork::pNetworkImpl.

443 {
444  return pNetworkImpl->AddGatherLayer(descriptor, name);
445 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddGreaterLayer()

IConnectableLayer * AddGreaterLayer ( const char *  name = nullptr)

Add a Greater layer to the network.

Parameters
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 420 of file Network.cpp.

References armnn::Greater, and INetwork::pNetworkImpl.

421 {
422  return pNetworkImpl->AddComparisonLayer(ComparisonDescriptor(ComparisonOperation::Greater), name);
423 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddInputLayer()

IConnectableLayer * AddInputLayer ( LayerBindingId  id,
const char *  name = nullptr 
)

Adds an input layer to the network.

Parameters
id- User generated id to uniquely identify a particular input. The same id needs to be specified. when passing the inputs to the IRuntime::EnqueueWorkload() function.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 54 of file Network.cpp.

References INetwork::pNetworkImpl.

55 {
56  return pNetworkImpl->AddInputLayer(id, name);
57 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddInstanceNormalizationLayer()

IConnectableLayer * AddInstanceNormalizationLayer ( const InstanceNormalizationDescriptor desc,
const char *  name = nullptr 
)

Adds an instance normalization layer to the network.

Parameters
desc- Parameters for the instance normalization operation.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 320 of file Network.cpp.

References INetwork::pNetworkImpl.

322 {
323  return pNetworkImpl->AddInstanceNormalizationLayer(desc, name);
324 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddL2NormalizationLayer()

IConnectableLayer * AddL2NormalizationLayer ( const L2NormalizationDescriptor desc,
const char *  name = nullptr 
)

Adds an L2 normalization layer to the network.

Normalization is performed along dimension 1, but requires a 4d input.

Parameters
desc- Parameters for the L2 normalization operation.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 326 of file Network.cpp.

References INetwork::pNetworkImpl.

328 {
329  return pNetworkImpl->AddL2NormalizationLayer(desc, name);
330 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddLogicalBinaryLayer()

IConnectableLayer * AddLogicalBinaryLayer ( const LogicalBinaryDescriptor descriptor,
const char *  name = nullptr 
)

Adds a Logical Binary layer to the network.

Parameters
descriptor- Description of the Logical Binary layer.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 501 of file Network.cpp.

References INetwork::pNetworkImpl.

503 {
504  return pNetworkImpl->AddLogicalBinaryLayer(descriptor, name);
505 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddLogSoftmaxLayer()

IConnectableLayer * AddLogSoftmaxLayer ( const LogSoftmaxDescriptor logSoftmaxDescriptor,
const char *  name = nullptr 
)

Adds a log softmax layer to the network.

Parameters
logSoftmaxDescriptor- LogSoftmaxDescriptor to configure the log softmax.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 332 of file Network.cpp.

References INetwork::pNetworkImpl.

334 {
335  return pNetworkImpl->AddLogSoftmaxLayer(logSoftmaxDescriptor, name);
336 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddLstmLayer()

IConnectableLayer * AddLstmLayer ( const LstmDescriptor descriptor,
const LstmInputParams params,
const char *  name = nullptr 
)

Add a Lstm layer to the network.

Parameters
descriptor- Parameters for the Lstm operation
params- Weights and biases for the LSTM cell
name- Optional name for the layer
Returns
- Interface for configuring the layer.

Definition at line 371 of file Network.cpp.

References INetwork::pNetworkImpl.

374 {
375  return pNetworkImpl->AddLstmLayer(descriptor, params, name);
376 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddMaximumLayer()

IConnectableLayer * AddMaximumLayer ( const char *  name = nullptr)

Add a Maximum layer to the network.

Parameters
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 388 of file Network.cpp.

References INetwork::pNetworkImpl.

389 {
390  return pNetworkImpl->AddMaximumLayer(name);
391 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddMeanLayer()

IConnectableLayer * AddMeanLayer ( const MeanDescriptor meanDescriptor,
const char *  name = nullptr 
)

Add a Mean layer to the network.

Parameters
meanDescriptor- Parameters for the mean operation.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 393 of file Network.cpp.

References INetwork::pNetworkImpl.

394 {
395  return pNetworkImpl->AddMeanLayer(meanDescriptor, name);
396 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddMergeLayer()

IConnectableLayer * AddMergeLayer ( const char *  name = nullptr)

Adds a merge layer to the network.

Parameters
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 253 of file Network.cpp.

References INetwork::pNetworkImpl.

254 {
255  return pNetworkImpl->AddMergeLayer(name);
256 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddMergerLayer()

IConnectableLayer * AddMergerLayer ( const MergerDescriptor mergerDescriptor,
const char *  name = nullptr 
)

Adds a concat layer to the network.

Parameters
mergerDescriptor- MergerDescriptor (synonym for OriginsDescriptor) to configure the concatenation process. Number of Views must be equal to the number of inputs, and their order must match - e.g. first view corresponds to the first input, second view to the second input, etc....
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 258 of file Network.cpp.

References INetwork::pNetworkImpl.

260 {
261  return pNetworkImpl->AddConcatLayer(mergerDescriptor, name);
262 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddMinimumLayer()

IConnectableLayer * AddMinimumLayer ( const char *  name = nullptr)

Add a Minimum layer to the network.

Parameters
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 415 of file Network.cpp.

References INetwork::pNetworkImpl.

416 {
417  return pNetworkImpl->AddMinimumLayer(name);
418 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddMultiplicationLayer()

IConnectableLayer * AddMultiplicationLayer ( const char *  name = nullptr)

Adds a multiplication layer to the network.

Parameters
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 274 of file Network.cpp.

References INetwork::pNetworkImpl.

275 {
276  return pNetworkImpl->AddMultiplicationLayer(name);
277 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddNormalizationLayer()

IConnectableLayer * AddNormalizationLayer ( const NormalizationDescriptor normalizationDescriptor,
const char *  name = nullptr 
)

Adds a normalization layer to the network.

Parameters
normalizationDescriptor- NormalizationDescriptor to configure the normalization.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 231 of file Network.cpp.

References INetwork::pNetworkImpl.

233 {
234  return pNetworkImpl->AddNormalizationLayer(normalizationDescriptor, name);
235 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddOutputLayer()

IConnectableLayer * AddOutputLayer ( LayerBindingId  id,
const char *  name = nullptr 
)

Adds an output layer to the network.

Parameters
id- User generated id to uniquely identify a particular output. The same id needs to be specified when passing the outputs to the IRuntime::EnqueueWorkload() function.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 366 of file Network.cpp.

References INetwork::pNetworkImpl.

367 {
368  return pNetworkImpl->AddOutputLayer(id, name);
369 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddPadLayer()

IConnectableLayer * AddPadLayer ( const PadDescriptor padDescriptor,
const char *  name = nullptr 
)

Adds a fully pad layer to the network.

Parameters
paddings- n by 2 tensor, where n is the rank of the input tensor, such that paddings[i,0] indicates the amount of padding to add in front of dimonsion i, and paddings[i,1] indicates the amount of padding to add after the end of dimension i
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 398 of file Network.cpp.

References INetwork::pNetworkImpl.

400 {
401  return pNetworkImpl->AddPadLayer(padDescriptor, name);
402 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddPermuteLayer()

IConnectableLayer * AddPermuteLayer ( const PermuteDescriptor permuteDescriptor,
const char *  name = nullptr 
)

Adds a permute layer to the network.

Parameters
permuteDescriptor- PermuteDescriptor to configure the permute.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 207 of file Network.cpp.

References INetwork::pNetworkImpl.

209 {
210  return pNetworkImpl->AddPermuteLayer(permuteDescriptor, name);
211 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddPooling2dLayer()

IConnectableLayer * AddPooling2dLayer ( const Pooling2dDescriptor pooling2dDescriptor,
const char *  name = nullptr 
)

Adds a pooling layer to the network.

Parameters
pooling2dDescriptor- Pooling2dDescriptor to configure the pooling.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 219 of file Network.cpp.

References INetwork::pNetworkImpl.

221 {
222  return pNetworkImpl->AddPooling2dLayer(pooling2dDescriptor, name);
223 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddPreluLayer()

IConnectableLayer * AddPreluLayer ( const char *  name = nullptr)

Adds a PReLU layer to the network.

Parameters
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 452 of file Network.cpp.

References INetwork::pNetworkImpl.

453 {
454  return pNetworkImpl->AddPreluLayer(name);
455 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddQLstmLayer()

IConnectableLayer * AddQLstmLayer ( const QLstmDescriptor descriptor,
const LstmInputParams params,
const char *  name = nullptr 
)

Add a QLstm layer to the network.

Parameters
descriptor- Parameters for the QLstm operation
params- Weights and biases for the layer
name- Optional name for the layer
Returns
- Interface for configuring the layer.

Definition at line 494 of file Network.cpp.

References INetwork::pNetworkImpl.

497 {
498  return pNetworkImpl->AddQLstmLayer(descriptor, params, name);
499 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddQuantizedLstmLayer()

IConnectableLayer * AddQuantizedLstmLayer ( const QuantizedLstmInputParams params,
const char *  name = nullptr 
)

Add a QuantizedLstm layer to the network.

Parameters
params- The weights and biases for the Quantized LSTM cell
name- Optional name for the layer
Returns
- Interface for configuring the layer.

Definition at line 488 of file Network.cpp.

References INetwork::pNetworkImpl.

490 {
491  return pNetworkImpl->AddQuantizedLstmLayer(params, name);
492 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddQuantizeLayer()

IConnectableLayer * AddQuantizeLayer ( const char *  name = nullptr)

Add a quantize layer to the network.

Parameters
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 404 of file Network.cpp.

References INetwork::pNetworkImpl.

405 {
406  return pNetworkImpl->AddQuantizeLayer(name);
407 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddRankLayer()

IConnectableLayer * AddRankLayer ( const char *  name = nullptr)

Adds a rank layer to the network.

Parameters
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 289 of file Network.cpp.

References INetwork::pNetworkImpl.

290 {
291  return pNetworkImpl->AddRankLayer(name);
292 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddReduceLayer()

IConnectableLayer * AddReduceLayer ( const ReduceDescriptor reduceDescriptor,
const char *  name = nullptr 
)

Adds a reduce layer to the network.

Parameters
ReduceDescriptor- Parameters for the reduce operation.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 314 of file Network.cpp.

References INetwork::pNetworkImpl.

316 {
317  return pNetworkImpl->AddReduceLayer(reduceDescriptor, name);
318 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddReshapeLayer()

IConnectableLayer * AddReshapeLayer ( const ReshapeDescriptor reshapeDescriptor,
const char *  name = nullptr 
)

Adds a reshape layer to the network.

Parameters
reshapeDescriptor- Parameters for the reshape operation.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 344 of file Network.cpp.

References INetwork::pNetworkImpl.

346 {
347  return pNetworkImpl->AddReshapeLayer(reshapeDescriptor, name);
348 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddResizeBilinearLayer()

IConnectableLayer * AddResizeBilinearLayer ( const ResizeBilinearDescriptor resizeDesc,
const char *  name = nullptr 
)

Adds a resize bilinear layer to the network.

Parameters
resizeDesc- Parameters for the resize operation.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 294 of file Network.cpp.

References armnn::Bilinear, ResizeBilinearDescriptor::m_AlignCorners, ResizeDescriptor::m_AlignCorners, ResizeBilinearDescriptor::m_DataLayout, ResizeDescriptor::m_DataLayout, ResizeBilinearDescriptor::m_HalfPixelCenters, ResizeDescriptor::m_HalfPixelCenters, ResizeDescriptor::m_Method, ResizeBilinearDescriptor::m_TargetHeight, ResizeDescriptor::m_TargetHeight, ResizeBilinearDescriptor::m_TargetWidth, ResizeDescriptor::m_TargetWidth, and INetwork::pNetworkImpl.

296 {
297  ResizeDescriptor resizeDescriptor;
298  resizeDescriptor.m_Method = ResizeMethod::Bilinear;
299  resizeDescriptor.m_DataLayout = descriptor.m_DataLayout;
300  resizeDescriptor.m_TargetWidth = descriptor.m_TargetWidth;
301  resizeDescriptor.m_TargetHeight = descriptor.m_TargetHeight;
302  resizeDescriptor.m_AlignCorners = descriptor.m_AlignCorners;
303  resizeDescriptor.m_HalfPixelCenters = descriptor.m_HalfPixelCenters;
304 
305  return pNetworkImpl->AddResizeLayer(resizeDescriptor, name);
306 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddResizeLayer()

IConnectableLayer * AddResizeLayer ( const ResizeDescriptor resizeDescriptor,
const char *  name = nullptr 
)

Adds a resize layer to the network.

Parameters
resizeDescriptor- Parameters for the resize operation.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 308 of file Network.cpp.

References INetwork::pNetworkImpl.

310 {
311  return pNetworkImpl->AddResizeLayer(resizeDescriptor, name);
312 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddRsqrtLayer()

IConnectableLayer * AddRsqrtLayer ( const char *  name = nullptr)

Add Reciprocal of square root layer to the network.

Parameters
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 430 of file Network.cpp.

References INetwork::pNetworkImpl, and armnn::Rsqrt.

431 {
432  return pNetworkImpl->AddElementwiseUnaryLayer(ElementwiseUnaryDescriptor(UnaryOperation::Rsqrt), name);
433 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddShapeLayer()

IConnectableLayer * AddShapeLayer ( const char *  name = nullptr)

Adds a shape layer to the network.

Parameters
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 471 of file Network.cpp.

References INetwork::pNetworkImpl.

472 {
473  return pNetworkImpl->AddShapeLayer(name);
474 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddSliceLayer()

IConnectableLayer * AddSliceLayer ( const SliceDescriptor sliceDescriptor,
const char *  name = nullptr 
)

Adds a slice layer to the network.

Parameters
sliceDescriptor- SliceDescriptor to configure the slice operation.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 237 of file Network.cpp.

References INetwork::pNetworkImpl.

238 {
239  return pNetworkImpl->AddSliceLayer(sliceDescriptor, name);
240 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddSoftmaxLayer()

IConnectableLayer * AddSoftmaxLayer ( const SoftmaxDescriptor softmaxDescriptor,
const char *  name = nullptr 
)

Adds a softmax layer to the network.

If the data type is QAsymm8, then the output quantization parameters must have a scale of 1/256 and an offset of 0

Parameters
softmaxDescriptor- SoftmaxDescriptor to configure the softmax.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 241 of file Network.cpp.

References INetwork::pNetworkImpl.

243 {
244  return pNetworkImpl->AddSoftmaxLayer(softmaxDescriptor, name);
245 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddSpaceToBatchNdLayer()

IConnectableLayer * AddSpaceToBatchNdLayer ( const SpaceToBatchNdDescriptor spaceToBatchNdDescriptor,
const char *  name = nullptr 
)

Adds a space to batch layer to the network.

Parameters
spaceToBatchNdDescriptor- Parameters for the space to batch operation.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 350 of file Network.cpp.

References INetwork::pNetworkImpl.

352 {
353  return pNetworkImpl->AddSpaceToBatchNdLayer(spaceToBatchNdDescriptor, name);
354 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddSpaceToDepthLayer()

IConnectableLayer * AddSpaceToDepthLayer ( const SpaceToDepthDescriptor spaceToDepthDescriptor,
const char *  name = nullptr 
)

Adds a space to depth layer to the network.

Parameters
spaceToDepthDescriptor- Parameters for the space to depth operation.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 356 of file Network.cpp.

References INetwork::pNetworkImpl.

358 {
359  return pNetworkImpl->AddSpaceToDepthLayer(spaceToDepthDescriptor, name);
360 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddSplitterLayer()

IConnectableLayer * AddSplitterLayer ( const ViewsDescriptor splitterDescriptor,
const char *  name = nullptr 
)

Adds a splitter layer to the network.

Parameters
splitterDescriptor- ViewsDescriptor to configure the splitting process. Number of Views must be equal to the number of outputs, and their order must match - e.g. first view corresponds to the first output, second view to the second output, etc....
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 247 of file Network.cpp.

References INetwork::pNetworkImpl.

249 {
250  return pNetworkImpl->AddSplitterLayer(splitterDescriptor, name);
251 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddStackLayer()

IConnectableLayer * AddStackLayer ( const StackDescriptor descriptor,
const char *  name = nullptr 
)

Adds a stack layer to the network.

Parameters
descriptor- Description of the stack layer.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 476 of file Network.cpp.

References INetwork::pNetworkImpl.

478 {
479  return pNetworkImpl->AddStackLayer(descriptor, name);
480 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddStandInLayer()

IConnectableLayer * AddStandInLayer ( const StandInDescriptor descriptor,
const char *  name = nullptr 
)

Add a stand-in layer for a type unknown to the Arm NN framework.

Note: Due to the nature of this layer, no validation can be performed by the framework. Furthermore, Any model containing this layer cannot make use of dynamic tensors since the tensor sizes cannot be inferred. - Descriptor for the StandIn layer.

Returns
- Interface for configuring the layer.

Definition at line 482 of file Network.cpp.

References INetwork::pNetworkImpl.

484 {
485  return pNetworkImpl->AddStandInLayer(descriptor, name);
486 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddStridedSliceLayer()

IConnectableLayer * AddStridedSliceLayer ( const StridedSliceDescriptor stridedSliceDescriptor,
const char *  name = nullptr 
)

Adds a strided slice layer to the network.

Parameters
StridedSliceDescriptor- Parameters for the strided slice operation.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 409 of file Network.cpp.

References INetwork::pNetworkImpl.

411 {
412  return pNetworkImpl->AddStridedSliceLayer(stridedSliceDescriptor, name);
413 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddSubtractionLayer()

IConnectableLayer * AddSubtractionLayer ( const char *  name = nullptr)

Adds a subtraction layer to the network.

Parameters
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 383 of file Network.cpp.

References INetwork::pNetworkImpl.

384 {
385  return pNetworkImpl->AddSubtractionLayer(name);
386 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddSwitchLayer()

IConnectableLayer * AddSwitchLayer ( const char *  name = nullptr)

Adds a switch layer to the network.

Parameters
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 447 of file Network.cpp.

References INetwork::pNetworkImpl.

448 {
449  return pNetworkImpl->AddSwitchLayer(name);
450 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddTransposeConvolution2dLayer()

IConnectableLayer * AddTransposeConvolution2dLayer ( const TransposeConvolution2dDescriptor descriptor,
const ConstTensor weights,
const Optional< ConstTensor > &  biases,
const char *  name = nullptr 
)

Adds a 2D transpose convolution layer to the network.

Parameters
descriptor- Description of the 2D transpose convolution layer.
weights- Tensor for the weights data.
biases- Optional tensor for the bias data.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 457 of file Network.cpp.

References INetwork::pNetworkImpl.

461 {
462  return pNetworkImpl->AddTransposeConvolution2dLayer(descriptor, weights, biases, name);
463 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddTransposeLayer()

IConnectableLayer * AddTransposeLayer ( const TransposeDescriptor transposeDescriptor,
const char *  name = nullptr 
)

Adds a transpose layer to the network.

Parameters
transposeDescriptor- TransposeDescriptor to configure the transpose.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 465 of file Network.cpp.

References INetwork::pNetworkImpl.

467 {
468  return pNetworkImpl->AddTransposeLayer(transposeDescriptor, name);
469 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ AddUnidirectionalSequenceLstmLayer()

IConnectableLayer * AddUnidirectionalSequenceLstmLayer ( const UnidirectionalSequenceLstmDescriptor descriptor,
const LstmInputParams params,
const char *  name = nullptr 
)

Add a UnidirectionalSequenceLstm layer to the network.

Parameters
descriptor- Parameters for the UnidirectionalSequenceLstm operation
params- Weights and biases for the UnidirectionalSequenceLstm
name- Optional name for the layer
Returns
- Interface for configuring the layer.

Definition at line 507 of file Network.cpp.

References INetwork::pNetworkImpl.

511 {
512  return pNetworkImpl->AddUnidirectionalSequenceLstmLayer(descriptor, params, name);
513 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ Create()

armnn::INetworkPtr Create ( NetworkOptions  networkOptions = {})
static
Examples:
DynamicSample.cpp, and SimpleSample.cpp.

Definition at line 530 of file Network.cpp.

References INetwork::CreateRaw(), and INetwork::Destroy().

Referenced by armnn::experimental::CreateStridedSliceNetwork(), GetSoftmaxProfilerJson(), QLstmEndToEnd(), TEST_SUITE(), and VerifyPostOptimisationStructureTestImpl().

531 {
532  return INetworkPtr(CreateRaw(networkOptions), &INetwork::Destroy);
533 }
static void Destroy(INetwork *network)
Definition: Network.cpp:535
static INetwork * CreateRaw(NetworkOptions networkOptions={})
Definition: Network.cpp:525
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:172

◆ CreateRaw()

armnn::INetwork * CreateRaw ( NetworkOptions  networkOptions = {})
static

Definition at line 525 of file Network.cpp.

References INetwork::INetwork().

Referenced by INetwork::Create().

526 {
527  return new INetwork(networkOptions);
528 }
INetwork(NetworkOptions networkOptions={})
Definition: Network.cpp:45

◆ Destroy()

void Destroy ( INetwork network)
static

Definition at line 535 of file Network.cpp.

Referenced by INetwork::Create().

536 {
537  delete network;
538 }

◆ ExecuteStrategy()

void ExecuteStrategy ( IStrategy strategy) const

Definition at line 520 of file Network.cpp.

References INetwork::pNetworkImpl.

Referenced by ISerializer::SerializerImpl::Serialize().

521 {
522  return pNetworkImpl->ExecuteStrategy(strategy);
523 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

◆ PrintGraph()

Status PrintGraph ( )

Definition at line 49 of file Network.cpp.

References INetwork::pNetworkImpl.

50 {
51  return pNetworkImpl->PrintGraph();
52 }
std::unique_ptr< NetworkImpl > pNetworkImpl
Definition: INetwork.hpp:725

Friends And Related Function Documentation

◆ GetInputTensorInfo

TensorInfo GetInputTensorInfo ( const INetwork network)
friend

◆ Optimize

IOptimizedNetworkPtr Optimize ( const INetwork network,
const std::vector< BackendId > &  backendPreferences,
const IDeviceSpec deviceSpec,
const OptimizerOptions options = OptimizerOptions(),
Optional< std::vector< std::string > &>  messages = EmptyOptional() 
)
friend

Create an optimized version of the network.

Parameters
networkINetwork description of the network to be optimized.
backendPreferencesThe choice of the backend ordered by user preferences.
deviceSpecDeviceSpec object as queried from the runtime. See IRuntime::GetDeviceSpec()
messagesIf there are failures or warnings a string describing same will be added to the vector
optionsOptimizerOptions object with optimizer configuration options
Returns
An IOptimizedNetworkPtr interface to the optimized network, throws an exception derived from armnn::Exception if process fails.

Definition at line 1613 of file Network.cpp.

1618 {
1619  if (backendPreferences.empty())
1620  {
1621  throw InvalidArgumentException("Invoked Optimize with no backends specified");
1622  }
1623 
1624  if (options.m_ReduceFp32ToFp16 && options.m_ReduceFp32ToBf16)
1625  {
1626  throw InvalidArgumentException("BFloat16 and Float16 optimization cannot be enabled at the same time.");
1627  }
1628 
1629  std::unique_ptr<Graph> graph = std::make_unique<Graph>(inNetwork.pNetworkImpl->GetGraph());
1630 
1631  auto optNet = IOptimizedNetworkPtr(new IOptimizedNetwork(std::move(graph), options.m_ModelOptions),
1633 
1634  IOptimizedNetwork* optNetObjPtr = optNet.get();
1635 
1636  // Get the optimized graph
1637  Graph& optGraph = optNetObjPtr->pOptimizedNetworkImpl->GetGraph();
1638 
1639  if(options.m_shapeInferenceMethod == ShapeInferenceMethod::InferAndValidate)
1640  {
1641  // Infer the tensor infos for all output slots. Throws an exception on failure
1642  optGraph.InferTensorInfos();
1643  }
1644 
1645  // Perform AddBroadcastReshapeLayer optimisation
1646  using namespace optimizations;
1648 
1649  if(options.m_shapeInferenceMethod == ShapeInferenceMethod::ValidateOnly)
1650  {
1651  // Validate the tensor infos for all output slots. Throws an exception on failure
1652  optGraph.InferTensorInfos();
1653  }
1654 
1655  // Perform optimisation passes
1661  MovePermuteUp(),
1662  MoveTransposeUp(),
1663  PermuteAsReshape(),
1676 
1677  // If Fp32 to Fp16 optimization is set convert Fp32 network to Fp16
1678  if (options.m_ReduceFp32ToFp16)
1679  {
1682  }
1683 
1684  // If Fp32 to Bf16 optimization is set convert Fp32 network to Bf16
1685  // Convert input of Convolution2d and FullyConnected from Fp32 to Bf16
1686  // Only Constant weight of Convolution2d and FullyConnected are converted from Fp32 to Bf16
1687  if (options.m_ReduceFp32ToBf16)
1688  {
1690  }
1691 
1692  // Initialize backend settings
1693  BackendSettings backendSettings(backendPreferences, deviceSpec);
1694  if (backendSettings.GetAvailablePreferredBackends().empty())
1695  {
1696  std::stringstream failureMsg;
1697  failureMsg << "None of the preferred backends " << backendPreferences
1698  << " are supported. Current platform provides " << backendSettings.m_SupportedBackends;
1699  ReportError(failureMsg.str(), messages);
1700  throw InvalidArgumentException(failureMsg.str());
1701  }
1702 
1703  // Create a map to temporarily hold initialized backend objects
1704  TensorHandleFactoryRegistry tensorHandleFactoryRegistry;
1705  BackendsMap backends = CreateSupportedBackends(tensorHandleFactoryRegistry, backendSettings);
1706 
1707  // Assign an available backend to each layer
1708  Graph::Iterator firstLayer = optGraph.begin();
1709  Graph::Iterator lastLayer = optGraph.end();
1710  OptimizationResult assignBackendsResult = AssignBackends(optNetObjPtr->pOptimizedNetworkImpl.get(),
1711  backendSettings,
1712  firstLayer,
1713  lastLayer,
1714  messages);
1715  if (assignBackendsResult.m_Error)
1716  {
1717  // Failed to assign a backend to each layer
1718  throw InvalidArgumentException("Failed to assign a backend to each layer");
1719  }
1720 
1723 
1724  // Apply the backend-specific optimizations
1725  OptimizationResult backendOptimizationResult = ApplyBackendOptimizations(optNetObjPtr->pOptimizedNetworkImpl.get(),
1726  backendSettings,
1727  backends,
1728  options.m_ModelOptions,
1729  messages);
1730  if (backendOptimizationResult.m_Error)
1731  {
1732  // Failed to apply the backend-specific optimizations
1733  throw InvalidArgumentException("Failed to apply the backend-specific optimizations");
1734  }
1735 
1736  // If the debug flag is set, then insert a DebugLayer after each layer
1737  // Doing this after applying the backend optimizations as they might have changed some layers
1738  if (options.m_Debug)
1739  {
1741  }
1742 
1743  // Calculate the compatibility strategies for tensor handles
1744  OptimizationResult strategyResult = SelectTensorHandleStrategy(optGraph,
1745  backends,
1746  tensorHandleFactoryRegistry,
1747  options.m_ImportEnabled,
1748  messages);
1749  if (strategyResult.m_Error)
1750  {
1751  // Failed to apply the backend-specific optimizations
1753  }
1754 
1755  // Based on the tensor handle strategy determined above, insert copy layers where required.
1756  optGraph.AddCompatibilityLayers(backends, tensorHandleFactoryRegistry);
1757 
1758  // Convert constants
1761 
1762  // Run backend specific optimizations (deprecated)
1763  for (auto&& chosenBackend : backendSettings.m_SelectedBackends)
1764  {
1765  auto factoryFun = BackendRegistryInstance().GetFactory(chosenBackend);
1766  auto backendPtr = factoryFun();
1767  ARMNN_ASSERT(backendPtr.get() != nullptr);
1768 
1770  auto backendSpecificOptimizations = backendPtr->GetOptimizations();
1772 
1773  if (!backendSpecificOptimizations.empty())
1774  {
1775  Optimizer::Pass(optNetObjPtr->pOptimizedNetworkImpl->GetGraph(), backendSpecificOptimizations);
1776  }
1777  }
1778 
1779  return optNet;
1780 }
OptimizeForConnection< Layer, PermuteLayer, SquashEqualSiblingsImpl< PermuteLayer > > SquashEqualPermuteSiblings
void ReportError(const std::string &errorMessage, Optional< std::vector< std::string > &> errorMessages)
Definition: Network.cpp:585
OptimizationResult AssignBackends(OptimizedNetworkImpl *optNetObjPtr, BackendSettings &backendSettings, Graph::Iterator &firstLayer, Graph::Iterator &lastLayer, Optional< std::vector< std::string > &> errMessages)
Definition: Network.cpp:933
FactoryFunction GetFactory(const BackendId &id) const
OptimizeForConnection< PermuteLayer, PermuteLayer, OptimizeInversePermutesImpl< PermuteLayer > > OptimizeInversePermutes
OptimizeForExclusiveConnection< PadLayer, Convolution2dLayer, pad_fold::FoldPadIntoConvolution2dImpl > FoldPadIntoConvolution2d
Optimizer::Optimizations MakeOptimizations(Args &&... args)
Definition: Optimizer.hpp:43
OptimizeForConnection< TransposeLayer, TransposeLayer, OptimizeInversePermutesImpl< TransposeLayer > > OptimizeInverseTransposes
OptimizeForExclusiveConnection< PadLayer, DepthwiseConvolution2dLayer, pad_fold::FoldPadIntoDepthwiseConvolution2dImpl > FoldPadIntoDepthwiseConvolution2d
OptimizeForConnection< TransposeLayer, BatchToSpaceNdLayer, PermuteAndBatchToSpaceAsDepthToSpaceImpl< TransposeLayer > > TransposeAndBatchToSpaceAsDepthToSpace
OptimizeForExclusiveConnection< DepthwiseConvolution2dLayer, BatchNormalizationLayer, FuseBatchNorm< DepthwiseConvolution2dLayer, armnn::DataType::Float32 > > FuseBatchNormIntoDepthwiseConvolution2DFloat32
#define ARMNN_NO_DEPRECATE_WARN_BEGIN
Definition: Deprecated.hpp:33
static void Pass(Graph &graph, const Optimizations &optimizations)
Definition: Optimizer.cpp:16
OptimizeForExclusiveConnection< DepthwiseConvolution2dLayer, BatchNormalizationLayer, FuseBatchNorm< DepthwiseConvolution2dLayer, armnn::DataType::Float16 > > FuseBatchNormIntoDepthwiseConvolution2DFloat16
OptimizeForExclusiveConnection< Convolution2dLayer, BatchNormalizationLayer, FuseBatchNorm< Convolution2dLayer, armnn::DataType::Float16 > > FuseBatchNormIntoConvolution2DFloat16
OptimizeForExclusiveConnection< Convolution2dLayer, BatchNormalizationLayer, FuseBatchNorm< Convolution2dLayer, armnn::DataType::Float32 > > FuseBatchNormIntoConvolution2DFloat32
BackendRegistry & BackendRegistryInstance()
OptimizeForConnection< Layer, ReshapeLayer, SquashEqualSiblingsImpl< ReshapeLayer > > SquashEqualReshapeSiblings
OptimizeForConnection< Layer, TransposeLayer, MoveTransposeUpImpl > MoveTransposeUp
LayerList::const_iterator Iterator
Definition: Graph.hpp:50
OptimizeForType< Layer, AddDebugImpl > InsertDebugLayer
Definition: AddDebug.hpp:34
OptimizeForConnection< ReshapeLayer, ReshapeLayer, OptimizeConsecutiveReshapesImpl > OptimizeConsecutiveReshapes
OptimizeForConnection< ConvertFp16ToFp32Layer, ConvertFp32ToFp16Layer, OptimizeInverseConversionsImpl > OptimizeInverseConversionsFp16
OptimizeForConnection< PermuteLayer, BatchToSpaceNdLayer, PermuteAndBatchToSpaceAsDepthToSpaceImpl< PermuteLayer > > PermuteAndBatchToSpaceAsDepthToSpace
OptimizeForConnection< Layer, PermuteLayer, MovePermuteUpImpl > MovePermuteUp
ConvertConstants< Float32ToFloat16, IsFloat16Layer > ConvertConstantsFloatToHalf
OptimizeForType< TransposeLayer, TransposeAsReshapeImpl > TransposeAsReshape
#define ARMNN_NO_DEPRECATE_WARN_END
Definition: Deprecated.hpp:34
OptimizationResult ApplyBackendOptimizations(OptimizedNetworkImpl *optNetObjPtr, BackendSettings &backendSettings, BackendsMap &backends, const ModelOptions &modelOptions, Optional< std::vector< std::string > &> errMessages)
Definition: Network.cpp:1092
Validate all output shapes.
std::unique_ptr< IOptimizedNetwork, void(*)(IOptimizedNetwork *network)> IOptimizedNetworkPtr
Definition: INetwork.hpp:173
#define ARMNN_ASSERT(COND)
Definition: Assert.hpp:14
OptimizeForType< PermuteLayer, PermuteAsReshapeImpl > PermuteAsReshape
OptimizeForConnection< Layer, TransposeLayer, SquashEqualSiblingsImpl< TransposeLayer > > SquashEqualTransposeSiblings
ConvertConstants< Float16ToFloat32, IsFloat32Layer > ConvertConstantsHalfToFloat
BackendsMap CreateSupportedBackends(TensorHandleFactoryRegistry &handleFactoryRegistry, BackendSettings &backendSettings)
Definition: Network.cpp:1073
OptimizeForConnection< ConvertFp32ToFp16Layer, ConvertFp16ToFp32Layer, OptimizeInverseConversionsImpl > OptimizeInverseConversionsFp32
OptimizeForExclusiveConnection< PadLayer, Pooling2dLayer, pad_fold::FoldPadIntoPooling2dImpl > FoldPadIntoPooling2d
Infer missing output shapes and validate all output shapes.
OptimizeForType< Layer, ConvertFp32NetworkToFp16Impl > Fp32NetworkToFp16Converter
OptimizationResult SelectTensorHandleStrategy(Graph &optGraph, BackendsMap &backends, TensorHandleFactoryRegistry &registry, bool importEnabled, Optional< std::vector< std::string > &> errMessages)
Definition: Network.cpp:1545
OptimizeForType< Layer, AddBroadcastReshapeLayerImpl > AddBroadcastReshapeLayer
static void Destroy(IOptimizedNetwork *network)
Definition: Network.cpp:554
OptimizeForType< Layer, ConvertFp32NetworkToBf16Impl > Fp32NetworkToBf16Converter
std::map< BackendId, std::unique_ptr< class IBackendInternal > > BackendsMap
Definition: Network.hpp:313
OptimizeForType< FullyConnectedLayer, RedirectMembersToConstantInputsImpl > RedirectMembersToConstantInputs

◆ TestConnectionPreservation

friend class TestConnectionPreservation
friend

Definition at line 715 of file INetwork.hpp.

◆ VisitLayersTopologically

void VisitLayersTopologically ( const INetwork inputNetwork,
IStrategy strategy 
)
friend

Member Data Documentation

◆ pNetworkImpl

std::unique_ptr<NetworkImpl> pNetworkImpl
protected

Definition at line 725 of file INetwork.hpp.

Referenced by INetwork::Accept(), INetwork::AddAbsLayer(), INetwork::AddActivationLayer(), INetwork::AddAdditionLayer(), INetwork::AddArgMinMaxLayer(), INetwork::AddBatchNormalizationLayer(), INetwork::AddBatchToSpaceNdLayer(), INetwork::AddCastLayer(), INetwork::AddComparisonLayer(), INetwork::AddConcatLayer(), INetwork::AddConstantLayer(), INetwork::AddConvolution2dLayer(), INetwork::AddDepthToSpaceLayer(), INetwork::AddDepthwiseConvolution2dLayer(), INetwork::AddDequantizeLayer(), INetwork::AddDetectionPostProcessLayer(), INetwork::AddDivisionLayer(), INetwork::AddElementwiseUnaryLayer(), INetwork::AddEqualLayer(), INetwork::AddFillLayer(), INetwork::AddFloorLayer(), INetwork::AddFullyConnectedLayer(), INetwork::AddGatherLayer(), INetwork::AddGreaterLayer(), INetwork::AddInputLayer(), INetwork::AddInstanceNormalizationLayer(), INetwork::AddL2NormalizationLayer(), INetwork::AddLogicalBinaryLayer(), INetwork::AddLogSoftmaxLayer(), INetwork::AddLstmLayer(), INetwork::AddMaximumLayer(), INetwork::AddMeanLayer(), INetwork::AddMergeLayer(), INetwork::AddMergerLayer(), INetwork::AddMinimumLayer(), INetwork::AddMultiplicationLayer(), INetwork::AddNormalizationLayer(), INetwork::AddOutputLayer(), INetwork::AddPadLayer(), INetwork::AddPermuteLayer(), INetwork::AddPooling2dLayer(), INetwork::AddPreluLayer(), INetwork::AddQLstmLayer(), INetwork::AddQuantizedLstmLayer(), INetwork::AddQuantizeLayer(), INetwork::AddRankLayer(), INetwork::AddReduceLayer(), INetwork::AddReshapeLayer(), INetwork::AddResizeBilinearLayer(), INetwork::AddResizeLayer(), INetwork::AddRsqrtLayer(), INetwork::AddShapeLayer(), INetwork::AddSliceLayer(), INetwork::AddSoftmaxLayer(), INetwork::AddSpaceToBatchNdLayer(), INetwork::AddSpaceToDepthLayer(), INetwork::AddSplitterLayer(), INetwork::AddStackLayer(), INetwork::AddStandInLayer(), INetwork::AddStridedSliceLayer(), INetwork::AddSubtractionLayer(), INetwork::AddSwitchLayer(), INetwork::AddTransposeConvolution2dLayer(), INetwork::AddTransposeLayer(), INetwork::AddUnidirectionalSequenceLstmLayer(), INetwork::ExecuteStrategy(), armnn::Optimize(), and INetwork::PrintGraph().


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