ArmNN
 25.11
Loading...
Searching...
No Matches
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.
IConnectableLayerAddArgMinMaxLayer (const ArgMinMaxDescriptor &desc, const char *name=nullptr)
 Adds an ArgMinMax layer to the network.
IConnectableLayerAddCastLayer (const char *name=nullptr)
 Adds a cast layer to the network.
IConnectableLayerAddComparisonLayer (const ComparisonDescriptor &comparisonDescriptor, const char *name=nullptr)
 Add a Comparison layer to the network.
IConnectableLayerAddConcatLayer (const ConcatDescriptor &concatDescriptor, const char *name=nullptr)
 Adds a concatenation layer to the network.
IConnectableLayerAddConvolution2dLayer (const Convolution2dDescriptor &convolution2dDescriptor, const char *name=nullptr)
 Adds a 2D convolution layer to the network.
IConnectableLayerAddConvolution3dLayer (const Convolution3dDescriptor &convolution3dDescriptor, const char *name=nullptr)
 Adds a 3D convolution layer to the network.
IConnectableLayerAddDepthToSpaceLayer (const DepthToSpaceDescriptor &depthToSpaceDescriptor, const char *name=nullptr)
 Adds a depth to space layer to the network.
IConnectableLayerAddDepthwiseConvolution2dLayer (const DepthwiseConvolution2dDescriptor &convolution2dDescriptor, const char *name=nullptr)
 Adds a 2D depthwise convolution layer to the network.
IConnectableLayerAddDequantizeLayer (const char *name=nullptr)
 Adds a Dequantize layer to the network.
IConnectableLayerAddDetectionPostProcessLayer (const DetectionPostProcessDescriptor &descriptor, const ConstTensor &anchors, const char *name=nullptr)
 Adds a Detection PostProcess layer to the network.
IConnectableLayerAddElementwiseBinaryLayer (const ElementwiseBinaryDescriptor &elementwiseBinaryDescriptor, const char *name=nullptr)
 Add an ElementwiseBinary layer to the network.
IConnectableLayerAddElementwiseUnaryLayer (const ElementwiseUnaryDescriptor &elementwiseUnaryDescriptor, const char *name=nullptr)
 Add an ElementwiseUnary layer to the network.
IConnectableLayerAddFillLayer (const FillDescriptor &fillDescriptor, const char *name=nullptr)
 Add an Fill layer to the network.
IConnectableLayerAddFullyConnectedLayer (const FullyConnectedDescriptor &fullyConnectedDescriptor, const char *name=nullptr)
 Adds a fully connected layer to the network.
IConnectableLayerAddFusedLayer (const FusedDescriptor &fusedDescriptor, const char *name=nullptr)
 Adds a Fused layer to the network.
IConnectableLayerAddPermuteLayer (const PermuteDescriptor &permuteDescriptor, const char *name=nullptr)
 Adds a permute layer to the network.
IConnectableLayerAddBatchToSpaceNdLayer (const BatchToSpaceNdDescriptor &batchToSpaceNdDescriptor, const char *name=nullptr)
 Adds a batch to space ND layer to the network.
IConnectableLayerAddPooling2dLayer (const Pooling2dDescriptor &pooling2dDescriptor, const char *name=nullptr)
 Adds a 2D pooling layer to the network.
IConnectableLayerAddPooling3dLayer (const Pooling3dDescriptor &pooling3dDescriptor, const char *name=nullptr)
 Adds a 3D pooling layer to the network.
IConnectableLayerAddPrecompiledLayer (const PreCompiledDescriptor &preCompiledDescriptor, CompiledBlobPtr compiledBlobPtr, const Optional< BackendId > &backend, const char *name=nullptr)
 Adds a Precompiled layer to the network.
IConnectableLayerAddActivationLayer (const ActivationDescriptor &activationDescriptor, const char *name=nullptr)
 Adds an activation layer to the network.
IConnectableLayerAddNormalizationLayer (const NormalizationDescriptor &normalizationDescriptor, const char *name=nullptr)
 Adds a normalization layer to the network.
IConnectableLayerAddSliceLayer (const SliceDescriptor &sliceDescriptor, const char *name=nullptr)
 Adds a slice layer to the network.
IConnectableLayerAddSoftmaxLayer (const SoftmaxDescriptor &softmaxDescriptor, const char *name=nullptr)
 Adds a softmax layer to the network.
IConnectableLayerAddSplitterLayer (const ViewsDescriptor &splitterDescriptor, const char *name=nullptr)
 Adds a splitter layer to the network.
IConnectableLayerAddMergeLayer (const char *name=nullptr)
 Adds a merge layer to the network.
IConnectableLayerAddAdditionLayer (const char *name=nullptr)
 Adds an addition layer to the network.
IConnectableLayerAddMultiplicationLayer (const char *name=nullptr)
 Adds a multiplication layer to the network.
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.
IConnectableLayerAddRankLayer (const char *name=nullptr)
 Adds a rank layer to the network.
IConnectableLayerAddResizeLayer (const ResizeDescriptor &resizeDescriptor, const char *name=nullptr)
 Adds a resize layer to the network.
IConnectableLayerAddReduceLayer (const ReduceDescriptor &reduceDescriptor, const char *name=nullptr)
 Adds a reduce layer to the network.
IConnectableLayerAddInstanceNormalizationLayer (const InstanceNormalizationDescriptor &desc, const char *name=nullptr)
 Adds an instance normalization layer to the network.
IConnectableLayerAddL2NormalizationLayer (const L2NormalizationDescriptor &desc, const char *name=nullptr)
 Adds an L2 normalization layer to the network.
IConnectableLayerAddLogSoftmaxLayer (const LogSoftmaxDescriptor &logSoftmaxDescriptor, const char *name=nullptr)
 Adds a log softmax layer to the network.
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.
IConnectableLayerAddReshapeLayer (const ReshapeDescriptor &reshapeDescriptor, const char *name=nullptr)
 Adds a reshape layer to the network.
IConnectableLayerAddShapeLayer (const char *name=nullptr)
 Adds a shape layer to the network.
IConnectableLayerAddSpaceToBatchNdLayer (const SpaceToBatchNdDescriptor &spaceToBatchNdDescriptor, const char *name=nullptr)
 Adds a space to batch layer to the network.
IConnectableLayerAddSpaceToDepthLayer (const SpaceToDepthDescriptor &spaceToDepthDescriptor, const char *name=nullptr)
 Adds a space to depth layer to the network.
IConnectableLayerAddFloorLayer (const char *name=nullptr)
 Adds a floor layer to the network.
IConnectableLayerAddOutputLayer (LayerBindingId id, const char *name=nullptr)
 Adds an output layer to the network.
IConnectableLayerAddLstmLayer (const LstmDescriptor &descriptor, const LstmInputParams &params, const char *name=nullptr)
 Add a Lstm layer to the network.
IConnectableLayerAddDivisionLayer (const char *name=nullptr)
 Adds a division layer to the network.
IConnectableLayerAddSubtractionLayer (const char *name=nullptr)
 Adds a subtraction layer to the network.
IConnectableLayerAddMaximumLayer (const char *name=nullptr)
 Add a Maximum layer to the network.
IConnectableLayerAddMeanLayer (const MeanDescriptor &meanDescriptor, const char *name=nullptr)
 Add a Mean layer to the network.
IConnectableLayerAddPadLayer (const PadDescriptor &padDescriptor, const char *name=nullptr)
 Adds a fully pad layer to the network.
IConnectableLayerAddQuantizeLayer (const char *name=nullptr)
 Add a quantize layer to the network.
IConnectableLayerAddStridedSliceLayer (const StridedSliceDescriptor &stridedSliceDescriptor, const char *name=nullptr)
 Adds a strided slice layer to the network.
IConnectableLayerAddMinimumLayer (const char *name=nullptr)
 Add a Minimum layer to the network.
IConnectableLayerAddGatherLayer (const GatherDescriptor &descriptor, const char *name=nullptr)
 Add Gather layer to the network.
IConnectableLayerAddGatherNdLayer (const char *name=nullptr)
 Add GatherNd layer to the network.
IConnectableLayerAddSwitchLayer (const char *name=nullptr)
 Adds a switch layer to the network.
IConnectableLayerAddPreluLayer (const char *name=nullptr)
 Adds a PReLU layer to the network.
IConnectableLayerAddTransposeConvolution2dLayer (const TransposeConvolution2dDescriptor &descriptor, const ConstTensor &weights, const Optional< ConstTensor > &biases, const char *name=nullptr)
 Adds a 2D transpose convolution layer to the network.
IConnectableLayerAddTransposeLayer (const TransposeDescriptor &transposeDescriptor, const char *name=nullptr)
 Adds a transpose layer to the network.
IConnectableLayerAddStackLayer (const StackDescriptor &descriptor, const char *name=nullptr)
 Adds a stack layer to the network.
IConnectableLayerAddStandInLayer (const StandInDescriptor &descriptor, const char *name=nullptr)
 Add a stand-in layer for a type unknown to the Arm NN framework.
IConnectableLayerAddQuantizedLstmLayer (const QuantizedLstmInputParams &params, const char *name=nullptr)
 Add a QuantizedLstm layer to the network.
IConnectableLayerAddQLstmLayer (const QLstmDescriptor &descriptor, const LstmInputParams &params, const char *name=nullptr)
 Add a QLstm layer to the network.
IConnectableLayerAddLogicalBinaryLayer (const LogicalBinaryDescriptor &descriptor, const char *name=nullptr)
 Adds a Logical Binary layer to the network.
IConnectableLayerAddUnidirectionalSequenceLstmLayer (const UnidirectionalSequenceLstmDescriptor &descriptor, const LstmInputParams &params, const char *name=nullptr)
 Add a UnidirectionalSequenceLstm layer to the network.
IConnectableLayerAddChannelShuffleLayer (const ChannelShuffleDescriptor &descriptor, const char *name=nullptr)
 Add a ChannelShuffle layer to the network.
IConnectableLayerAddBatchMatMulLayer (const BatchMatMulDescriptor &descriptor, const char *name=nullptr)
 Add a BatchMatMul layer to the network.
IConnectableLayerAddReverseV2Layer (const char *name=nullptr)
 Add a ReverseV2 layer to the network.
IConnectableLayerAddTileLayer (const TileDescriptor &descriptor, const char *name=nullptr)
 Add a Tile layer to the network.
IConnectableLayerAddBroadcastToLayer (const BroadcastToDescriptor &descriptor, const char *name=nullptr)
 Add a BroadcastTo layer to the network.
IConnectableLayerAddScatterNdLayer (const ScatterNdDescriptor &descriptor, const char *name=nullptr)
 Add a ScatterNd layer to the network.
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=EmptyOptional())
 Accept legacy OptimizerOptions.
IOptimizedNetworkPtr Optimize (const INetwork &network, const std::vector< BackendId > &backendPreferences, const IDeviceSpec &deviceSpec, const OptimizerOptionsOpaque &options=OptimizerOptionsOpaque(), Optional< std::vector< std::string > & > messages=EmptyOptional())
 Create an optimized version of the network.

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

45: pNetworkImpl(new NetworkImpl(networkOptions)) {}

References pNetworkImpl.

Referenced by CreateRaw(), Destroy(), GetInputTensorInfo, Optimize, Optimize, and VisitLayersTopologically.

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

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

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

410{
412 return pNetworkImpl->AddAdditionLayer(name);
414}
#define ARMNN_NO_DEPRECATE_WARN_BEGIN
#define ARMNN_NO_DEPRECATE_WARN_END

References ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, and 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 247 of file Network.cpp.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

509{
511 return pNetworkImpl->AddDivisionLayer(name);
513}

References ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, and 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 314 of file Network.cpp.

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

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

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

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

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

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

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

References 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));
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
Definition Tensor.hpp:330
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition INetwork.hpp:81
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
virtual int Connect(IInputSlot &destination)=0
A layer user-provided data can be bound to (e.g. inputs, outputs).
const OutputSlot & GetOutputSlot(unsigned int index=0) const override
Get the const output slot handle by slot index.
Definition Layer.hpp:339
int Connect(InputSlot &destination)
Definition Layer.cpp:123
A FullyConnectedDescriptor for the FullyConnectedLayer.

Definition at line 332 of file Network.cpp.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

523{
525 return pNetworkImpl->AddMaximumLayer(name);
527}

References ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, and 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 529 of file Network.cpp.

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

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

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

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

552{
554 return pNetworkImpl->AddMinimumLayer(name);
556}

References ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, and 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 416 of file Network.cpp.

417{
419 return pNetworkImpl->AddMultiplicationLayer(name);
421}

References ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, and 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 382 of file Network.cpp.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

516{
518 return pNetworkImpl->AddSubtractionLayer(name);
520}

References ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, and 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 569 of file Network.cpp.

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

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

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

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

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

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

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

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

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

References pNetworkImpl.

◆ Create()

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

Definition at line 682 of file Network.cpp.

683{
684 return INetworkPtr(CreateRaw(networkOptions), &INetwork::Destroy);
685}
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition INetwork.hpp:339

References CreateRaw(), and Destroy().

◆ CreateRaw()

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

Definition at line 677 of file Network.cpp.

678{
679 return new INetwork(networkOptions);
680}

References INetwork().

Referenced by Create().

◆ Destroy()

void Destroy ( INetwork * network)
static

Definition at line 687 of file Network.cpp.

688{
689 delete network;
690}

References INetwork().

Referenced by Create().

◆ ExecuteStrategy()

void ExecuteStrategy ( IStrategy & strategy) const

Definition at line 672 of file Network.cpp.

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

References pNetworkImpl.

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

◆ PrintGraph()

Status PrintGraph ( )

Definition at line 237 of file Network.cpp.

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

References pNetworkImpl.

◆ GetInputTensorInfo

TensorInfo GetInputTensorInfo ( const INetwork * network)
friend

References INetwork().

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

2279{
2280 return Optimize(inNetwork,
2281 backendPreferences,
2282 deviceSpec,
2283 OptimizerOptionsOpaque(options),
2284 messages);
2285}
IOptimizedNetworkPtr Optimize(const INetwork &network, const std::vector< BackendId > &backendPreferences, const IDeviceSpec &deviceSpec, const OptimizerOptionsOpaque &options=OptimizerOptionsOpaque(), Optional< std::vector< std::string > & > messages=EmptyOptional())
Create an optimized version of the network.
Definition Network.cpp:2287

References INetwork(), and armnn::Optimize().

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

2292{
2293 return Optimize(inNetwork.pNetworkImpl->GetGraph(),
2294 backendPreferences,
2295 deviceSpec,
2296 options,
2297 messages);
2298}

References INetwork(), armnn::Optimize(), and pNetworkImpl.

◆ TestConnectionPreservation

friend class TestConnectionPreservation
friend

Definition at line 880 of file INetwork.hpp.

References TestConnectionPreservation.

Referenced by TestConnectionPreservation.

◆ VisitLayersTopologically

void VisitLayersTopologically ( const INetwork * inputNetwork,
IStrategy & strategy )
friend

References INetwork().

Member Data Documentation

◆ pNetworkImpl

std::unique_ptr<NetworkImpl> pNetworkImpl
protected

Definition at line 895 of file INetwork.hpp.

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


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