ArmNN
 26.07
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 char *name=nullptr)
 Adds a 2D convolution layer to the network. More...
 
IConnectableLayerAddConvolution3dLayer (const Convolution3dDescriptor &convolution3dDescriptor, const char *name=nullptr)
 Adds a 3D convolution layer to the network. More...
 
IConnectableLayerAddDepthToSpaceLayer (const DepthToSpaceDescriptor &depthToSpaceDescriptor, const char *name=nullptr)
 Adds a depth to space layer to the network. More...
 
IConnectableLayerAddDepthwiseConvolution2dLayer (const DepthwiseConvolution2dDescriptor &convolution2dDescriptor, const char *name=nullptr)
 Adds a 2D depthwise convolution layer to the network. More...
 
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...
 
IConnectableLayerAddElementwiseBinaryLayer (const ElementwiseBinaryDescriptor &elementwiseBinaryDescriptor, const char *name=nullptr)
 Add an ElementwiseBinary 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...
 
IConnectableLayerAddFusedLayer (const FusedDescriptor &fusedDescriptor, const char *name=nullptr)
 Adds a Fused layer to the network. More...
 
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 2D pooling layer to the network. More...
 
IConnectableLayerAddPooling3dLayer (const Pooling3dDescriptor &pooling3dDescriptor, const char *name=nullptr)
 Adds a 3D pooling layer to the network. More...
 
IConnectableLayerAddPrecompiledLayer (const PreCompiledDescriptor &preCompiledDescriptor, CompiledBlobPtr compiledBlobPtr, const Optional< BackendId > &backend, const char *name=nullptr)
 Adds a Precompiled 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...
 
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...
 
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...
 
IConnectableLayerAddGatherLayer (const GatherDescriptor &descriptor, const char *name=nullptr)
 Add Gather layer to the network. More...
 
IConnectableLayerAddGatherNdLayer (const char *name=nullptr)
 Add GatherNd 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...
 
IConnectableLayerAddChannelShuffleLayer (const ChannelShuffleDescriptor &descriptor, const char *name=nullptr)
 Add a ChannelShuffle layer to the network. More...
 
IConnectableLayerAddBatchMatMulLayer (const BatchMatMulDescriptor &descriptor, const char *name=nullptr)
 Add a BatchMatMul layer to the network. More...
 
IConnectableLayerAddReverseV2Layer (const char *name=nullptr)
 Add a ReverseV2 layer to the network. More...
 
IConnectableLayerAddTileLayer (const TileDescriptor &descriptor, const char *name=nullptr)
 Add a Tile layer to the network. More...
 
IConnectableLayerAddBroadcastToLayer (const BroadcastToDescriptor &descriptor, const char *name=nullptr)
 Add a BroadcastTo layer to the network. More...
 
IConnectableLayerAddScatterNdLayer (const ScatterNdDescriptor &descriptor, const char *name=nullptr)
 Add a ScatterNd layer to the network. More...
 
void ExecuteStrategy (IStrategy &strategy) const
 

Static Public Member Functions

static INetworkCreateRaw (const NetworkOptions &networkOptions={})
 
static INetworkPtr Create (const 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)
 Accept legacy OptimizerOptions. More...
 
IOptimizedNetworkPtr Optimize (const INetwork &network, const std::vector< BackendId > &backendPreferences, const IDeviceSpec &deviceSpec, const OptimizerOptionsOpaque &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 347 of file INetwork.hpp.

Constructor & Destructor Documentation

◆ ~INetwork()

~INetwork ( )
protecteddefault

◆ INetwork()

INetwork ( NetworkOptions  networkOptions = {})
protected

Definition at line 46 of file Network.cpp.

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

Referenced by INetwork::CreateRaw().

Member Function Documentation

◆ 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 377 of file Network.cpp.

379 {
380  return pNetworkImpl->AddActivationLayer(activationDescriptor, name);
381 }

References INetwork::pNetworkImpl.

◆ 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 410 of file Network.cpp.

411 {
413  return pNetworkImpl->AddAdditionLayer(name);
415 }
#define ARMNN_NO_DEPRECATE_WARN_BEGIN
Definition: Deprecated.hpp:33
#define ARMNN_NO_DEPRECATE_WARN_END
Definition: Deprecated.hpp:34

References ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, and INetwork::pNetworkImpl.

Referenced by armnn::FuseAdditionLayer().

◆ 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 248 of file Network.cpp.

250 {
251  return pNetworkImpl->AddArgMinMaxLayer(desc, name);
252 }

References INetwork::pNetworkImpl.

◆ AddBatchMatMulLayer()

IConnectableLayer * AddBatchMatMulLayer ( const BatchMatMulDescriptor descriptor,
const char *  name = nullptr 
)

Add a BatchMatMul layer to the network.

Parameters
descriptor- Parameters for the BatchMatMul operation
name- Optional name for the layer
Returns
- Interface for configuring the layer

Definition at line 644 of file Network.cpp.

646 {
647  return pNetworkImpl->AddBatchMatMulLayer(descriptor, name);
648 }

References INetwork::pNetworkImpl.

◆ 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 424 of file Network.cpp.

430 {
431  return pNetworkImpl->AddBatchNormalizationLayer(desc, mean, variance, beta, gamma, name);
432 }

References INetwork::pNetworkImpl.

Referenced by armnn::FuseBatchNormalizationLayer().

◆ 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 351 of file Network.cpp.

353 {
354  return pNetworkImpl->AddBatchToSpaceNdLayer(batchToSpaceNdDescriptor, name);
355 }

References INetwork::pNetworkImpl.

◆ AddBroadcastToLayer()

IConnectableLayer * AddBroadcastToLayer ( const BroadcastToDescriptor descriptor,
const char *  name = nullptr 
)

Add a BroadcastTo layer to the network.

Parameters
descriptor- Parameters for the BroadcastTo operation
name- Optional name for the layer
Returns
- Interface for configuring the layer

Definition at line 661 of file Network.cpp.

663 {
664  return pNetworkImpl->AddBroadcastToLayer(descriptor, name);
665 }

References INetwork::pNetworkImpl.

◆ 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 254 of file Network.cpp.

255 {
256  return pNetworkImpl->AddCastLayer(name);
257 }

References INetwork::pNetworkImpl.

◆ AddChannelShuffleLayer()

IConnectableLayer * AddChannelShuffleLayer ( const ChannelShuffleDescriptor descriptor,
const char *  name = nullptr 
)

Add a ChannelShuffle layer to the network.

Parameters
descriptor- Parameters for the ChannelShuffle operation
name- Optional name for the layer
Returns
- Interface for configuring the layer

Definition at line 638 of file Network.cpp.

640 {
641  return pNetworkImpl->AddChannelShuffleLayer(descriptor, name);
642 }

References INetwork::pNetworkImpl.

◆ 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 259 of file Network.cpp.

261 {
262  return pNetworkImpl->AddComparisonLayer(comparisonDescriptor, name);
263 }

References INetwork::pNetworkImpl.

◆ 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 266 of file Network.cpp.

268 {
269  return pNetworkImpl->AddConcatLayer(concatDescriptor, name);
270 }

References INetwork::pNetworkImpl.

◆ 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 469 of file Network.cpp.

471 {
472  return pNetworkImpl->AddConstantLayer(input, name);
473 }

References INetwork::pNetworkImpl.

◆ AddConvolution2dLayer()

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

Adds a 2D convolution layer to the network.

Parameters
convolution2dDescriptor- Description of the 2D convolution layer.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 273 of file Network.cpp.

275 {
276  return pNetworkImpl->AddConvolution2dLayer(convolution2dDescriptor, name);
277 }

References INetwork::pNetworkImpl.

Referenced by armnn::FoldPadLayer2d(), and armnn::FuseConvolution2dLayer().

◆ AddConvolution3dLayer()

IConnectableLayer * AddConvolution3dLayer ( const Convolution3dDescriptor convolution3dDescriptor,
const char *  name = nullptr 
)

Adds a 3D convolution layer to the network.

Parameters
convolution3dDescriptor- Description of the 3D convolution layer.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 279 of file Network.cpp.

281 {
282  return pNetworkImpl->AddConvolution3dLayer(convolution3dDescriptor, name);
283 }

References INetwork::pNetworkImpl.

◆ 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 286 of file Network.cpp.

288 {
289  return pNetworkImpl->AddDepthToSpaceLayer(depthToSpaceDescriptor, name);
290 }

References INetwork::pNetworkImpl.

◆ AddDepthwiseConvolution2dLayer()

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

Adds a 2D depthwise convolution layer to the network.

Parameters
convolution2dDescriptor- Description of the 2D depthwise convolution layer.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 293 of file Network.cpp.

296 {
297  return pNetworkImpl->AddDepthwiseConvolution2dLayer(convolution2dDescriptor, name);
298 }

References INetwork::pNetworkImpl.

Referenced by armnn::FoldPadLayer2d(), and armnn::FuseDepthwiseConvolution2dLayer().

◆ AddDequantizeLayer()

IConnectableLayer * AddDequantizeLayer ( const char *  name = nullptr)

Adds a Dequantize layer to the network.

Returns
- Interface for configuring the layer.

Definition at line 301 of file Network.cpp.

302 {
303  return pNetworkImpl->AddDequantizeLayer(name);
304 }

References INetwork::pNetworkImpl.

◆ 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 307 of file Network.cpp.

311 {
312  return pNetworkImpl->AddDetectionPostProcessLayer(descriptor, anchors, name);
313 }

References INetwork::pNetworkImpl.

◆ 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 509 of file Network.cpp.

510 {
512  return pNetworkImpl->AddDivisionLayer(name);
514 }

References ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, and INetwork::pNetworkImpl.

Referenced by armnn::FuseDivisionLayer().

◆ AddElementwiseBinaryLayer()

IConnectableLayer * AddElementwiseBinaryLayer ( const ElementwiseBinaryDescriptor elementwiseBinaryDescriptor,
const char *  name = nullptr 
)

Add an ElementwiseBinary layer to the network.

Parameters
name- Optional name for the layer.
desc- Descriptor for the elementwiseBinary operations.
Returns
- Interface for configuring the layer.

Definition at line 315 of file Network.cpp.

317 {
318  return pNetworkImpl->AddElementwiseBinaryLayer(elementwiseBinaryDescriptor, name);
319 }

References INetwork::pNetworkImpl.

Referenced by armnn::FuseElementwiseBinaryLayer().

◆ 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 operations.
Returns
- Interface for configuring the layer.

Definition at line 321 of file Network.cpp.

323 {
324  return pNetworkImpl->AddElementwiseUnaryLayer(elementwiseUnaryDescriptor, name);
325 }

References INetwork::pNetworkImpl.

◆ 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 327 of file Network.cpp.

329 {
330  return pNetworkImpl->AddFillLayer(fillDescriptor, name);
331 }

References INetwork::pNetworkImpl.

◆ 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 493 of file Network.cpp.

494 {
495  return pNetworkImpl->AddFloorLayer(name);
496 }

References INetwork::pNetworkImpl.

◆ AddFullyConnectedLayer()

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 333 of file Network.cpp.

335 {
336  return pNetworkImpl->AddFullyConnectedLayer(fullyConnectedDescriptor, name);
337 }

References INetwork::pNetworkImpl.

Referenced by armnn::FuseFullyConnectedLayer().

◆ AddFusedLayer()

IConnectableLayer * AddFusedLayer ( const FusedDescriptor fusedDescriptor,
const char *  name = nullptr 
)

Adds a Fused layer to the network.

Method use is for backend users.

Parameters
fusedDescriptor- FusedDescriptor contains parameters for the Fused layer.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 339 of file Network.cpp.

341 {
342  return pNetworkImpl->AddFusedLayer(fusedDescriptor, name);
343 }

References INetwork::pNetworkImpl.

Referenced by NeonBackend::OptimizeSubgraphView().

◆ AddGatherLayer()

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 559 of file Network.cpp.

561 {
562  return pNetworkImpl->AddGatherLayer(descriptor, name);
563 }

References INetwork::pNetworkImpl.

◆ AddGatherNdLayer()

IConnectableLayer * AddGatherNdLayer ( const char *  name = nullptr)

Add GatherNd layer to the network.

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

Definition at line 565 of file Network.cpp.

566 {
567  return pNetworkImpl->AddGatherNdLayer(name);
568 }

References INetwork::pNetworkImpl.

◆ 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 243 of file Network.cpp.

244 {
245  return pNetworkImpl->AddInputLayer(id, name);
246 }

References INetwork::pNetworkImpl.

◆ 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 451 of file Network.cpp.

453 {
454  return pNetworkImpl->AddInstanceNormalizationLayer(desc, name);
455 }

References INetwork::pNetworkImpl.

◆ 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 457 of file Network.cpp.

459 {
460  return pNetworkImpl->AddL2NormalizationLayer(desc, name);
461 }

References INetwork::pNetworkImpl.

◆ 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 624 of file Network.cpp.

626 {
627  return pNetworkImpl->AddLogicalBinaryLayer(descriptor, name);
628 }

References INetwork::pNetworkImpl.

◆ 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 463 of file Network.cpp.

465 {
466  return pNetworkImpl->AddLogSoftmaxLayer(logSoftmaxDescriptor, name);
467 }

References INetwork::pNetworkImpl.

◆ 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 502 of file Network.cpp.

505 {
506  return pNetworkImpl->AddLstmLayer(descriptor, params, name);
507 }

References INetwork::pNetworkImpl.

◆ 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 523 of file Network.cpp.

524 {
526  return pNetworkImpl->AddMaximumLayer(name);
528 }

References ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, and INetwork::pNetworkImpl.

◆ 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 530 of file Network.cpp.

531 {
532  return pNetworkImpl->AddMeanLayer(meanDescriptor, name);
533 }

References INetwork::pNetworkImpl.

◆ 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 405 of file Network.cpp.

406 {
407  return pNetworkImpl->AddMergeLayer(name);
408 }

References INetwork::pNetworkImpl.

◆ 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 552 of file Network.cpp.

553 {
555  return pNetworkImpl->AddMinimumLayer(name);
557 }

References ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, and INetwork::pNetworkImpl.

◆ 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 417 of file Network.cpp.

418 {
420  return pNetworkImpl->AddMultiplicationLayer(name);
422 }

References ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, and INetwork::pNetworkImpl.

Referenced by armnn::FuseMultiplicationLayer().

◆ 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 383 of file Network.cpp.

385 {
386  return pNetworkImpl->AddNormalizationLayer(normalizationDescriptor, name);
387 }

References INetwork::pNetworkImpl.

◆ 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 497 of file Network.cpp.

498 {
499  return pNetworkImpl->AddOutputLayer(id, name);
500 }

References INetwork::pNetworkImpl.

◆ 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 535 of file Network.cpp.

537 {
538  return pNetworkImpl->AddPadLayer(padDescriptor, name);
539 }

References INetwork::pNetworkImpl.

◆ 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 345 of file Network.cpp.

347 {
348  return pNetworkImpl->AddPermuteLayer(permuteDescriptor, name);
349 }

References INetwork::pNetworkImpl.

◆ AddPooling2dLayer()

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

Adds a 2D 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 357 of file Network.cpp.

359 {
360  return pNetworkImpl->AddPooling2dLayer(pooling2dDescriptor, name);
361 }

References INetwork::pNetworkImpl.

Referenced by armnn::FoldPadLayer2d().

◆ AddPooling3dLayer()

IConnectableLayer * AddPooling3dLayer ( const Pooling3dDescriptor pooling3dDescriptor,
const char *  name = nullptr 
)

Adds a 3D pooling layer to the network.

Parameters
pooling3dDescriptor- Pooling3dDescriptor to configure the pooling.
name- Optional name for the layer.
Returns
- Interface for configuring the layer.

Definition at line 363 of file Network.cpp.

365 {
366  return pNetworkImpl->AddPooling3dLayer(pooling3dDescriptor, name);
367 }

References INetwork::pNetworkImpl.

◆ AddPrecompiledLayer()

IConnectableLayer * AddPrecompiledLayer ( const PreCompiledDescriptor preCompiledDescriptor,
CompiledBlobPtr  compiledBlobPtr,
const Optional< BackendId > &  backend,
const char *  name = nullptr 
)

Adds a Precompiled layer to the network.

Method use is for backend users.

Parameters
preCompiledDescriptor- PreCompiledDescriptor contains parameters for the Precompiled layer.
compiledBlobPtr- CompiledBlobPtr pre-compiled object set for the Precompiled layer.
backend- optional BackendId set for the Precompiled layer.
Returns
- Interface for configuring the layer.

Definition at line 369 of file Network.cpp.

373 {
374  return pNetworkImpl->AddPrecompiledLayer(preCompiledDescriptor, std::move(compiledBlobPtr), backend, name);
375 }

References INetwork::pNetworkImpl.

Referenced by TosaRefBackend::OptimizeSubgraphView().

◆ 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 575 of file Network.cpp.

576 {
577  return pNetworkImpl->AddPreluLayer(name);
578 }

References INetwork::pNetworkImpl.

◆ 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 617 of file Network.cpp.

620 {
621  return pNetworkImpl->AddQLstmLayer(descriptor, params, name);
622 }

References INetwork::pNetworkImpl.

◆ 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 611 of file Network.cpp.

613 {
614  return pNetworkImpl->AddQuantizedLstmLayer(params, name);
615 }

References INetwork::pNetworkImpl.

◆ 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 541 of file Network.cpp.

542 {
543  return pNetworkImpl->AddQuantizeLayer(name);
544 }

References INetwork::pNetworkImpl.

◆ 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 434 of file Network.cpp.

435 {
436  return pNetworkImpl->AddRankLayer(name);
437 }

References INetwork::pNetworkImpl.

◆ 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 445 of file Network.cpp.

447 {
448  return pNetworkImpl->AddReduceLayer(reduceDescriptor, name);
449 }

References INetwork::pNetworkImpl.

Referenced by armnn::ChainReduceLayers().

◆ 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 475 of file Network.cpp.

477 {
478  return pNetworkImpl->AddReshapeLayer(reshapeDescriptor, name);
479 }

References INetwork::pNetworkImpl.

◆ 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 439 of file Network.cpp.

441 {
442  return pNetworkImpl->AddResizeLayer(resizeDescriptor, name);
443 }

References INetwork::pNetworkImpl.

◆ AddReverseV2Layer()

IConnectableLayer * AddReverseV2Layer ( const char *  name = nullptr)

Add a ReverseV2 layer to the network.

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

Definition at line 650 of file Network.cpp.

651 {
652  return pNetworkImpl->AddReverseV2Layer(name);
653 }

References INetwork::pNetworkImpl.

◆ AddScatterNdLayer()

IConnectableLayer * AddScatterNdLayer ( const ScatterNdDescriptor descriptor,
const char *  name = nullptr 
)

Add a ScatterNd layer to the network.

Parameters
descriptor- Parameters for the ScatterNd operation
name- Optional name for the layer
Returns
- Interface for configuring the layer

Definition at line 667 of file Network.cpp.

669 {
670  return pNetworkImpl->AddScatterNdLayer(descriptor, name);
671 }

References INetwork::pNetworkImpl.

◆ 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 594 of file Network.cpp.

595 {
596  return pNetworkImpl->AddShapeLayer(name);
597 }

References INetwork::pNetworkImpl.

◆ 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 389 of file Network.cpp.

390 {
391  return pNetworkImpl->AddSliceLayer(sliceDescriptor, name);
392 }

References INetwork::pNetworkImpl.

◆ 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 393 of file Network.cpp.

395 {
396  return pNetworkImpl->AddSoftmaxLayer(softmaxDescriptor, name);
397 }

References INetwork::pNetworkImpl.

◆ 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 481 of file Network.cpp.

483 {
484  return pNetworkImpl->AddSpaceToBatchNdLayer(spaceToBatchNdDescriptor, name);
485 }

References INetwork::pNetworkImpl.

◆ 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 487 of file Network.cpp.

489 {
490  return pNetworkImpl->AddSpaceToDepthLayer(spaceToDepthDescriptor, name);
491 }

References INetwork::pNetworkImpl.

◆ 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 399 of file Network.cpp.

401 {
402  return pNetworkImpl->AddSplitterLayer(splitterDescriptor, name);
403 }

References INetwork::pNetworkImpl.

◆ 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 599 of file Network.cpp.

601 {
602  return pNetworkImpl->AddStackLayer(descriptor, name);
603 }

References INetwork::pNetworkImpl.

◆ 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 - Descriptor for the StandIn layer.

Returns
- Interface for configuring the layer.

Definition at line 605 of file Network.cpp.

607 {
608  return pNetworkImpl->AddStandInLayer(descriptor, name);
609 }

References INetwork::pNetworkImpl.

◆ 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 546 of file Network.cpp.

548 {
549  return pNetworkImpl->AddStridedSliceLayer(stridedSliceDescriptor, name);
550 }

References INetwork::pNetworkImpl.

◆ 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 516 of file Network.cpp.

517 {
519  return pNetworkImpl->AddSubtractionLayer(name);
521 }

References ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, and INetwork::pNetworkImpl.

Referenced by armnn::FuseSubtractionLayer().

◆ 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 570 of file Network.cpp.

571 {
572  return pNetworkImpl->AddSwitchLayer(name);
573 }

References INetwork::pNetworkImpl.

◆ AddTileLayer()

IConnectableLayer * AddTileLayer ( const TileDescriptor descriptor,
const char *  name = nullptr 
)

Add a Tile layer to the network.

Parameters
descriptor- Parameters for the Tile operation
name- Optional name for the layer
Returns
- Interface for configuring the layer

Definition at line 655 of file Network.cpp.

657 {
658  return pNetworkImpl->AddTileLayer(descriptor, name);
659 }

References INetwork::pNetworkImpl.

◆ 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 580 of file Network.cpp.

584 {
585  return pNetworkImpl->AddTransposeConvolution2dLayer(descriptor, weights, biases, name);
586 }

References INetwork::pNetworkImpl.

◆ 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 588 of file Network.cpp.

590 {
591  return pNetworkImpl->AddTransposeLayer(transposeDescriptor, name);
592 }

References INetwork::pNetworkImpl.

◆ 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 630 of file Network.cpp.

634 {
635  return pNetworkImpl->AddUnidirectionalSequenceLstmLayer(descriptor, params, name);
636 }

References INetwork::pNetworkImpl.

◆ Create()

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

Definition at line 683 of file Network.cpp.

684 {
685  return INetworkPtr(CreateRaw(networkOptions), &INetwork::Destroy);
686 }
static void Destroy(INetwork *network)
Definition: Network.cpp:688
static INetwork * CreateRaw(const NetworkOptions &networkOptions={})
Definition: Network.cpp:678
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:339

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

◆ CreateRaw()

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

Definition at line 678 of file Network.cpp.

679 {
680  return new INetwork(networkOptions);
681 }
INetwork(NetworkOptions networkOptions={})
Definition: Network.cpp:46

References INetwork::INetwork().

Referenced by INetwork::Create().

◆ Destroy()

void Destroy ( INetwork network)
static

Definition at line 688 of file Network.cpp.

689 {
690  delete network;
691 }

Referenced by INetwork::Create().

◆ ExecuteStrategy()

void ExecuteStrategy ( IStrategy strategy) const

Definition at line 673 of file Network.cpp.

674 {
675  return pNetworkImpl->ExecuteStrategy(strategy);
676 }

References INetwork::pNetworkImpl.

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

◆ PrintGraph()

Status PrintGraph ( )

Definition at line 238 of file Network.cpp.

239 {
240  return pNetworkImpl->PrintGraph();
241 }

References INetwork::pNetworkImpl.

Friends And Related Function Documentation

◆ GetInputTensorInfo

TensorInfo GetInputTensorInfo ( const INetwork network)
friend

◆ Optimize [1/2]

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

Accept legacy OptimizerOptions.

Definition at line 2281 of file Network.cpp.

2286 {
2287  return Optimize(inNetwork,
2288  backendPreferences,
2289  deviceSpec,
2290  OptimizerOptionsOpaque(options),
2291  messages);
2292 }
friend IOptimizedNetworkPtr Optimize(const INetwork &network, const std::vector< BackendId > &backendPreferences, const IDeviceSpec &deviceSpec, const OptimizerOptions &options, Optional< std::vector< std::string > & > messages)
Accept legacy OptimizerOptions.
Definition: Network.cpp:2281

◆ Optimize [2/2]

IOptimizedNetworkPtr Optimize ( const INetwork network,
const std::vector< BackendId > &  backendPreferences,
const IDeviceSpec deviceSpec,
const OptimizerOptionsOpaque options = OptimizerOptionsOpaque(),
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 2294 of file Network.cpp.

2299 {
2300  return Optimize(inNetwork.pNetworkImpl->GetGraph(),
2301  backendPreferences,
2302  deviceSpec,
2303  options,
2304  messages);
2305 }

◆ TestConnectionPreservation

friend class TestConnectionPreservation
friend

Definition at line 880 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 895 of file INetwork.hpp.

Referenced by INetwork::AddActivationLayer(), INetwork::AddAdditionLayer(), INetwork::AddArgMinMaxLayer(), INetwork::AddBatchMatMulLayer(), INetwork::AddBatchNormalizationLayer(), INetwork::AddBatchToSpaceNdLayer(), INetwork::AddBroadcastToLayer(), INetwork::AddCastLayer(), INetwork::AddChannelShuffleLayer(), INetwork::AddComparisonLayer(), INetwork::AddConcatLayer(), INetwork::AddConstantLayer(), INetwork::AddConvolution2dLayer(), INetwork::AddConvolution3dLayer(), INetwork::AddDepthToSpaceLayer(), INetwork::AddDepthwiseConvolution2dLayer(), INetwork::AddDequantizeLayer(), INetwork::AddDetectionPostProcessLayer(), INetwork::AddDivisionLayer(), INetwork::AddElementwiseBinaryLayer(), INetwork::AddElementwiseUnaryLayer(), INetwork::AddFillLayer(), INetwork::AddFloorLayer(), INetwork::AddFullyConnectedLayer(), INetwork::AddFusedLayer(), INetwork::AddGatherLayer(), INetwork::AddGatherNdLayer(), INetwork::AddInputLayer(), INetwork::AddInstanceNormalizationLayer(), INetwork::AddL2NormalizationLayer(), INetwork::AddLogicalBinaryLayer(), INetwork::AddLogSoftmaxLayer(), INetwork::AddLstmLayer(), INetwork::AddMaximumLayer(), INetwork::AddMeanLayer(), INetwork::AddMergeLayer(), INetwork::AddMinimumLayer(), INetwork::AddMultiplicationLayer(), INetwork::AddNormalizationLayer(), INetwork::AddOutputLayer(), INetwork::AddPadLayer(), INetwork::AddPermuteLayer(), INetwork::AddPooling2dLayer(), INetwork::AddPooling3dLayer(), INetwork::AddPrecompiledLayer(), INetwork::AddPreluLayer(), INetwork::AddQLstmLayer(), INetwork::AddQuantizedLstmLayer(), INetwork::AddQuantizeLayer(), INetwork::AddRankLayer(), INetwork::AddReduceLayer(), INetwork::AddReshapeLayer(), INetwork::AddResizeLayer(), INetwork::AddReverseV2Layer(), INetwork::AddScatterNdLayer(), INetwork::AddShapeLayer(), INetwork::AddSliceLayer(), INetwork::AddSoftmaxLayer(), INetwork::AddSpaceToBatchNdLayer(), INetwork::AddSpaceToDepthLayer(), INetwork::AddSplitterLayer(), INetwork::AddStackLayer(), INetwork::AddStandInLayer(), INetwork::AddStridedSliceLayer(), INetwork::AddSubtractionLayer(), INetwork::AddSwitchLayer(), INetwork::AddTileLayer(), INetwork::AddTransposeConvolution2dLayer(), INetwork::AddTransposeLayer(), INetwork::AddUnidirectionalSequenceLstmLayer(), INetwork::ExecuteStrategy(), and INetwork::PrintGraph().


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