24.08
|
Main network class which provides the interface for building up a neural network. More...
#include <INetwork.hpp>
Public Member Functions | |
Status | PrintGraph () |
IConnectableLayer * | AddInputLayer (LayerBindingId id, const char *name=nullptr) |
Adds an input layer to the network. More... | |
IConnectableLayer * | AddArgMinMaxLayer (const ArgMinMaxDescriptor &desc, const char *name=nullptr) |
Adds an ArgMinMax layer to the network. More... | |
IConnectableLayer * | AddCastLayer (const char *name=nullptr) |
Adds a cast layer to the network. More... | |
IConnectableLayer * | AddComparisonLayer (const ComparisonDescriptor &comparisonDescriptor, const char *name=nullptr) |
Add a Comparison layer to the network. More... | |
IConnectableLayer * | AddConcatLayer (const ConcatDescriptor &concatDescriptor, const char *name=nullptr) |
Adds a concatenation layer to the network. More... | |
IConnectableLayer * | AddConvolution2dLayer (const Convolution2dDescriptor &convolution2dDescriptor, const char *name=nullptr) |
Adds a 2D convolution layer to the network. More... | |
IConnectableLayer * | AddConvolution3dLayer (const Convolution3dDescriptor &convolution3dDescriptor, const char *name=nullptr) |
Adds a 3D convolution layer to the network. More... | |
IConnectableLayer * | AddDepthToSpaceLayer (const DepthToSpaceDescriptor &depthToSpaceDescriptor, const char *name=nullptr) |
Adds a depth to space layer to the network. More... | |
IConnectableLayer * | AddDepthwiseConvolution2dLayer (const DepthwiseConvolution2dDescriptor &convolution2dDescriptor, const char *name=nullptr) |
Adds a 2D depthwise convolution layer to the network. More... | |
IConnectableLayer * | AddDequantizeLayer (const char *name=nullptr) |
Adds a Dequantize layer to the network. More... | |
IConnectableLayer * | AddDetectionPostProcessLayer (const DetectionPostProcessDescriptor &descriptor, const ConstTensor &anchors, const char *name=nullptr) |
Adds a Detection PostProcess layer to the network. More... | |
IConnectableLayer * | AddElementwiseBinaryLayer (const ElementwiseBinaryDescriptor &elementwiseBinaryDescriptor, const char *name=nullptr) |
Add an ElementwiseBinary layer to the network. More... | |
IConnectableLayer * | AddElementwiseUnaryLayer (const ElementwiseUnaryDescriptor &elementwiseUnaryDescriptor, const char *name=nullptr) |
Add an ElementwiseUnary layer to the network. More... | |
IConnectableLayer * | AddFillLayer (const FillDescriptor &fillDescriptor, const char *name=nullptr) |
Add an Fill layer to the network. More... | |
IConnectableLayer * | AddFullyConnectedLayer (const FullyConnectedDescriptor &fullyConnectedDescriptor, const char *name=nullptr) |
Adds a fully connected layer to the network. More... | |
IConnectableLayer * | AddFusedLayer (const FusedDescriptor &fusedDescriptor, const char *name=nullptr) |
Adds a Fused layer to the network. More... | |
IConnectableLayer * | AddPermuteLayer (const PermuteDescriptor &permuteDescriptor, const char *name=nullptr) |
Adds a permute layer to the network. More... | |
IConnectableLayer * | AddBatchToSpaceNdLayer (const BatchToSpaceNdDescriptor &batchToSpaceNdDescriptor, const char *name=nullptr) |
Adds a batch to space ND layer to the network. More... | |
IConnectableLayer * | AddPooling2dLayer (const Pooling2dDescriptor &pooling2dDescriptor, const char *name=nullptr) |
Adds a 2D pooling layer to the network. More... | |
IConnectableLayer * | AddPooling3dLayer (const Pooling3dDescriptor &pooling3dDescriptor, const char *name=nullptr) |
Adds a 3D pooling layer to the network. More... | |
IConnectableLayer * | AddPrecompiledLayer (const PreCompiledDescriptor &preCompiledDescriptor, CompiledBlobPtr compiledBlobPtr, const Optional< BackendId > &backend, const char *name=nullptr) |
Adds a Precompiled layer to the network. More... | |
IConnectableLayer * | AddActivationLayer (const ActivationDescriptor &activationDescriptor, const char *name=nullptr) |
Adds an activation layer to the network. More... | |
IConnectableLayer * | AddNormalizationLayer (const NormalizationDescriptor &normalizationDescriptor, const char *name=nullptr) |
Adds a normalization layer to the network. More... | |
IConnectableLayer * | AddSliceLayer (const SliceDescriptor &sliceDescriptor, const char *name=nullptr) |
Adds a slice layer to the network. More... | |
IConnectableLayer * | AddSoftmaxLayer (const SoftmaxDescriptor &softmaxDescriptor, const char *name=nullptr) |
Adds a softmax layer to the network. More... | |
IConnectableLayer * | AddSplitterLayer (const ViewsDescriptor &splitterDescriptor, const char *name=nullptr) |
Adds a splitter layer to the network. More... | |
IConnectableLayer * | AddMergeLayer (const char *name=nullptr) |
Adds a merge layer to the network. More... | |
IConnectableLayer * | AddAdditionLayer (const char *name=nullptr) |
Adds an addition layer to the network. More... | |
IConnectableLayer * | AddMultiplicationLayer (const char *name=nullptr) |
Adds a multiplication layer to the network. More... | |
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. More... | |
IConnectableLayer * | AddRankLayer (const char *name=nullptr) |
Adds a rank layer to the network. More... | |
IConnectableLayer * | AddResizeLayer (const ResizeDescriptor &resizeDescriptor, const char *name=nullptr) |
Adds a resize layer to the network. More... | |
IConnectableLayer * | AddReduceLayer (const ReduceDescriptor &reduceDescriptor, const char *name=nullptr) |
Adds a reduce layer to the network. More... | |
IConnectableLayer * | AddInstanceNormalizationLayer (const InstanceNormalizationDescriptor &desc, const char *name=nullptr) |
Adds an instance normalization layer to the network. More... | |
IConnectableLayer * | AddL2NormalizationLayer (const L2NormalizationDescriptor &desc, const char *name=nullptr) |
Adds an L2 normalization layer to the network. More... | |
IConnectableLayer * | AddLogSoftmaxLayer (const LogSoftmaxDescriptor &logSoftmaxDescriptor, const char *name=nullptr) |
Adds a log softmax layer to the network. More... | |
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. More... | |
IConnectableLayer * | AddReshapeLayer (const ReshapeDescriptor &reshapeDescriptor, const char *name=nullptr) |
Adds a reshape layer to the network. More... | |
IConnectableLayer * | AddShapeLayer (const char *name=nullptr) |
Adds a shape layer to the network. More... | |
IConnectableLayer * | AddSpaceToBatchNdLayer (const SpaceToBatchNdDescriptor &spaceToBatchNdDescriptor, const char *name=nullptr) |
Adds a space to batch layer to the network. More... | |
IConnectableLayer * | AddSpaceToDepthLayer (const SpaceToDepthDescriptor &spaceToDepthDescriptor, const char *name=nullptr) |
Adds a space to depth layer to the network. More... | |
IConnectableLayer * | AddFloorLayer (const char *name=nullptr) |
Adds a floor layer to the network. More... | |
IConnectableLayer * | AddOutputLayer (LayerBindingId id, const char *name=nullptr) |
Adds an output layer to the network. More... | |
IConnectableLayer * | AddLstmLayer (const LstmDescriptor &descriptor, const LstmInputParams ¶ms, const char *name=nullptr) |
Add a Lstm layer to the network. More... | |
IConnectableLayer * | AddDivisionLayer (const char *name=nullptr) |
Adds a division layer to the network. More... | |
IConnectableLayer * | AddSubtractionLayer (const char *name=nullptr) |
Adds a subtraction layer to the network. More... | |
IConnectableLayer * | AddMaximumLayer (const char *name=nullptr) |
Add a Maximum layer to the network. More... | |
IConnectableLayer * | AddMeanLayer (const MeanDescriptor &meanDescriptor, const char *name=nullptr) |
Add a Mean layer to the network. More... | |
IConnectableLayer * | AddPadLayer (const PadDescriptor &padDescriptor, const char *name=nullptr) |
Adds a fully pad layer to the network. More... | |
IConnectableLayer * | AddQuantizeLayer (const char *name=nullptr) |
Add a quantize layer to the network. More... | |
IConnectableLayer * | AddStridedSliceLayer (const StridedSliceDescriptor &stridedSliceDescriptor, const char *name=nullptr) |
Adds a strided slice layer to the network. More... | |
IConnectableLayer * | AddMinimumLayer (const char *name=nullptr) |
Add a Minimum layer to the network. More... | |
IConnectableLayer * | AddGatherLayer (const GatherDescriptor &descriptor, const char *name=nullptr) |
Add Gather layer to the network. More... | |
IConnectableLayer * | AddGatherNdLayer (const char *name=nullptr) |
Add GatherNd layer to the network. More... | |
IConnectableLayer * | AddSwitchLayer (const char *name=nullptr) |
Adds a switch layer to the network. More... | |
IConnectableLayer * | AddPreluLayer (const char *name=nullptr) |
Adds a PReLU layer to the network. More... | |
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. More... | |
IConnectableLayer * | AddTransposeLayer (const TransposeDescriptor &transposeDescriptor, const char *name=nullptr) |
Adds a transpose layer to the network. More... | |
IConnectableLayer * | AddStackLayer (const StackDescriptor &descriptor, const char *name=nullptr) |
Adds a stack layer to the network. More... | |
IConnectableLayer * | AddStandInLayer (const StandInDescriptor &descriptor, const char *name=nullptr) |
Add a stand-in layer for a type unknown to the Arm NN framework. More... | |
IConnectableLayer * | AddQuantizedLstmLayer (const QuantizedLstmInputParams ¶ms, const char *name=nullptr) |
Add a QuantizedLstm layer to the network. More... | |
IConnectableLayer * | AddQLstmLayer (const QLstmDescriptor &descriptor, const LstmInputParams ¶ms, const char *name=nullptr) |
Add a QLstm layer to the network. More... | |
IConnectableLayer * | AddLogicalBinaryLayer (const LogicalBinaryDescriptor &descriptor, const char *name=nullptr) |
Adds a Logical Binary layer to the network. More... | |
IConnectableLayer * | AddUnidirectionalSequenceLstmLayer (const UnidirectionalSequenceLstmDescriptor &descriptor, const LstmInputParams ¶ms, const char *name=nullptr) |
Add a UnidirectionalSequenceLstm layer to the network. More... | |
IConnectableLayer * | AddChannelShuffleLayer (const ChannelShuffleDescriptor &descriptor, const char *name=nullptr) |
Add a ChannelShuffle layer to the network. More... | |
IConnectableLayer * | AddBatchMatMulLayer (const BatchMatMulDescriptor &descriptor, const char *name=nullptr) |
Add a BatchMatMul layer to the network. More... | |
IConnectableLayer * | AddReverseV2Layer (const char *name=nullptr) |
Add a ReverseV2 layer to the network. More... | |
IConnectableLayer * | AddTileLayer (const TileDescriptor &descriptor, const char *name=nullptr) |
Add a Tile layer to the network. More... | |
IConnectableLayer * | AddBroadcastToLayer (const BroadcastToDescriptor &descriptor, const char *name=nullptr) |
Add a BroadcastTo layer to the network. More... | |
IConnectableLayer * | AddScatterNdLayer (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 INetwork * | CreateRaw (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< NetworkImpl > | pNetworkImpl |
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... | |
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.
|
protecteddefault |
|
protected |
IConnectableLayer * AddActivationLayer | ( | const ActivationDescriptor & | activationDescriptor, |
const char * | name = nullptr |
||
) |
Adds an activation layer to the network.
activationDescriptor | - ActivationDescriptor to configure the activation. |
name | - Optional name for the layer. |
Definition at line 376 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddAdditionLayer | ( | const char * | name = nullptr | ) |
Adds an addition layer to the network.
name | - Optional name for the layer. |
Definition at line 409 of file Network.cpp.
References ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, and INetwork::pNetworkImpl.
Referenced by armnn::FuseAdditionLayer().
IConnectableLayer * AddArgMinMaxLayer | ( | const ArgMinMaxDescriptor & | desc, |
const char * | name = nullptr |
||
) |
Adds an ArgMinMax layer to the network.
desc | - Parameters for the L2 normalization operation. |
name | - Optional name for the layer. |
Definition at line 247 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddBatchMatMulLayer | ( | const BatchMatMulDescriptor & | descriptor, |
const char * | name = nullptr |
||
) |
Add a BatchMatMul layer to the network.
descriptor | - Parameters for the BatchMatMul operation |
name | - Optional name for the layer |
Definition at line 643 of file Network.cpp.
References INetwork::pNetworkImpl.
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.
mean | - Pre-calculated mean for each channel. |
variance | - Pre-calculated variance for each channel. |
beta | - Per-channel additive factor. |
gamma | - Per-channel multiplicative factor. |
name | - Optional name for the layer. |
Definition at line 423 of file Network.cpp.
References INetwork::pNetworkImpl.
Referenced by armnn::FuseBatchNormalizationLayer().
IConnectableLayer * AddBatchToSpaceNdLayer | ( | const BatchToSpaceNdDescriptor & | batchToSpaceNdDescriptor, |
const char * | name = nullptr |
||
) |
Adds a batch to space ND layer to the network.
batchToSpaceNdDescriptor | - Description of the layer. |
name | - Optional name for the layer. |
Definition at line 350 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddBroadcastToLayer | ( | const BroadcastToDescriptor & | descriptor, |
const char * | name = nullptr |
||
) |
Add a BroadcastTo layer to the network.
descriptor | - Parameters for the BroadcastTo operation |
name | - Optional name for the layer |
Definition at line 660 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddCastLayer | ( | const char * | name = nullptr | ) |
Adds a cast layer to the network.
name | - Optional name for the layer. |
Definition at line 253 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddChannelShuffleLayer | ( | const ChannelShuffleDescriptor & | descriptor, |
const char * | name = nullptr |
||
) |
Add a ChannelShuffle layer to the network.
descriptor | - Parameters for the ChannelShuffle operation |
name | - Optional name for the layer |
Definition at line 637 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddComparisonLayer | ( | const ComparisonDescriptor & | comparisonDescriptor, |
const char * | name = nullptr |
||
) |
Add a Comparison layer to the network.
name | - Optional name for the layer. |
desc | - Descriptor for the comparison operation. |
Definition at line 258 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddConcatLayer | ( | const ConcatDescriptor & | concatDescriptor, |
const char * | name = nullptr |
||
) |
Adds a concatenation layer to the network.
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. |
Definition at line 265 of file Network.cpp.
References INetwork::pNetworkImpl.
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.
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. |
Definition at line 468 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddConvolution2dLayer | ( | const Convolution2dDescriptor & | convolution2dDescriptor, |
const char * | name = nullptr |
||
) |
Adds a 2D convolution layer to the network.
convolution2dDescriptor | - Description of the 2D convolution layer. |
name | - Optional name for the layer. |
Definition at line 272 of file Network.cpp.
References INetwork::pNetworkImpl.
Referenced by armnn::FuseConvolution2dLayer().
IConnectableLayer * AddConvolution3dLayer | ( | const Convolution3dDescriptor & | convolution3dDescriptor, |
const char * | name = nullptr |
||
) |
Adds a 3D convolution layer to the network.
convolution3dDescriptor | - Description of the 3D convolution layer. |
name | - Optional name for the layer. |
Definition at line 278 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddDepthToSpaceLayer | ( | const DepthToSpaceDescriptor & | depthToSpaceDescriptor, |
const char * | name = nullptr |
||
) |
Adds a depth to space layer to the network.
depthToSpaceDescriptor | - Parameters for the depth to space operation. |
name | - Optional name for the layer. |
Definition at line 285 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddDepthwiseConvolution2dLayer | ( | const DepthwiseConvolution2dDescriptor & | convolution2dDescriptor, |
const char * | name = nullptr |
||
) |
Adds a 2D depthwise convolution layer to the network.
convolution2dDescriptor | - Description of the 2D depthwise convolution layer. |
name | - Optional name for the layer. |
Definition at line 292 of file Network.cpp.
References INetwork::pNetworkImpl.
Referenced by armnn::FuseDepthwiseConvolution2dLayer().
IConnectableLayer * AddDequantizeLayer | ( | const char * | name = nullptr | ) |
Adds a Dequantize layer to the network.
Definition at line 300 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddDetectionPostProcessLayer | ( | const DetectionPostProcessDescriptor & | descriptor, |
const ConstTensor & | anchors, | ||
const char * | name = nullptr |
||
) |
Adds a Detection PostProcess layer to the network.
descriptor | - Description of the Detection PostProcess layer. |
anchors | - Tensor for anchors. |
name | - Optional name for the layer. |
Definition at line 306 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddDivisionLayer | ( | const char * | name = nullptr | ) |
Adds a division layer to the network.
name | - Optional name for the layer. |
Definition at line 508 of file Network.cpp.
References ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, and INetwork::pNetworkImpl.
Referenced by armnn::FuseDivisionLayer().
IConnectableLayer * AddElementwiseBinaryLayer | ( | const ElementwiseBinaryDescriptor & | elementwiseBinaryDescriptor, |
const char * | name = nullptr |
||
) |
Add an ElementwiseBinary layer to the network.
name | - Optional name for the layer. |
desc | - Descriptor for the elementwiseBinary operations. |
Definition at line 314 of file Network.cpp.
References INetwork::pNetworkImpl.
Referenced by armnn::FuseElementwiseBinaryLayer().
IConnectableLayer * AddElementwiseUnaryLayer | ( | const ElementwiseUnaryDescriptor & | elementwiseUnaryDescriptor, |
const char * | name = nullptr |
||
) |
Add an ElementwiseUnary layer to the network.
name | - Optional name for the layer. |
desc | - Descriptor for the elementwiseUnary operations. |
Definition at line 320 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddFillLayer | ( | const FillDescriptor & | fillDescriptor, |
const char * | name = nullptr |
||
) |
Add an Fill layer to the network.
name | - Optional name for the layer. |
fillDescriptor | - Descriptor for the fill operation. |
Definition at line 326 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddFloorLayer | ( | const char * | name = nullptr | ) |
Adds a floor layer to the network.
name | - Optional name for the layer. |
Definition at line 492 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddFullyConnectedLayer | ( | const FullyConnectedDescriptor & | fullyConnectedDescriptor, |
const char * | name = nullptr |
||
) |
Adds a fully connected layer to the network.
fullyConnectedDescriptor | - Description of the fully connected layer. |
Definition at line 332 of file Network.cpp.
References INetwork::pNetworkImpl.
Referenced by armnn::FuseFullyConnectedLayer().
IConnectableLayer * AddFusedLayer | ( | const FusedDescriptor & | fusedDescriptor, |
const char * | name = nullptr |
||
) |
Adds a Fused layer to the network.
Method use is for backend users.
fusedDescriptor | - FusedDescriptor contains parameters for the Fused layer. |
name | - Optional name for the layer. |
Definition at line 338 of file Network.cpp.
References INetwork::pNetworkImpl.
Referenced by NeonBackend::OptimizeSubgraphView().
IConnectableLayer * AddGatherLayer | ( | const GatherDescriptor & | descriptor, |
const char * | name = nullptr |
||
) |
Add Gather layer to the network.
descriptor | - Description of the gather layer. |
name | - Optional name for the layer. |
Definition at line 558 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddGatherNdLayer | ( | const char * | name = nullptr | ) |
Add GatherNd layer to the network.
name | - Optional name for the layer. |
Definition at line 564 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddInputLayer | ( | LayerBindingId | id, |
const char * | name = nullptr |
||
) |
Adds an input layer to the network.
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. |
Definition at line 242 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddInstanceNormalizationLayer | ( | const InstanceNormalizationDescriptor & | desc, |
const char * | name = nullptr |
||
) |
Adds an instance normalization layer to the network.
desc | - Parameters for the instance normalization operation. |
name | - Optional name for the layer. |
Definition at line 450 of file Network.cpp.
References INetwork::pNetworkImpl.
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.
desc | - Parameters for the L2 normalization operation. |
name | - Optional name for the layer. |
Definition at line 456 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddLogicalBinaryLayer | ( | const LogicalBinaryDescriptor & | descriptor, |
const char * | name = nullptr |
||
) |
Adds a Logical Binary layer to the network.
descriptor | - Description of the Logical Binary layer. |
name | - Optional name for the layer. |
Definition at line 623 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddLogSoftmaxLayer | ( | const LogSoftmaxDescriptor & | logSoftmaxDescriptor, |
const char * | name = nullptr |
||
) |
Adds a log softmax layer to the network.
logSoftmaxDescriptor | - LogSoftmaxDescriptor to configure the log softmax. |
name | - Optional name for the layer. |
Definition at line 462 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddLstmLayer | ( | const LstmDescriptor & | descriptor, |
const LstmInputParams & | params, | ||
const char * | name = nullptr |
||
) |
Add a Lstm layer to the network.
descriptor | - Parameters for the Lstm operation |
params | - Weights and biases for the LSTM cell |
name | - Optional name for the layer |
Definition at line 501 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddMaximumLayer | ( | const char * | name = nullptr | ) |
Add a Maximum layer to the network.
name | - Optional name for the layer. |
Definition at line 522 of file Network.cpp.
References ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, and INetwork::pNetworkImpl.
IConnectableLayer * AddMeanLayer | ( | const MeanDescriptor & | meanDescriptor, |
const char * | name = nullptr |
||
) |
Add a Mean layer to the network.
meanDescriptor | - Parameters for the mean operation. |
name | - Optional name for the layer. |
Definition at line 529 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddMergeLayer | ( | const char * | name = nullptr | ) |
Adds a merge layer to the network.
name | - Optional name for the layer. |
Definition at line 404 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddMinimumLayer | ( | const char * | name = nullptr | ) |
Add a Minimum layer to the network.
name | - Optional name for the layer. |
Definition at line 551 of file Network.cpp.
References ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, and INetwork::pNetworkImpl.
IConnectableLayer * AddMultiplicationLayer | ( | const char * | name = nullptr | ) |
Adds a multiplication layer to the network.
name | - Optional name for the layer. |
Definition at line 416 of file Network.cpp.
References ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, and INetwork::pNetworkImpl.
Referenced by armnn::FuseMultiplicationLayer().
IConnectableLayer * AddNormalizationLayer | ( | const NormalizationDescriptor & | normalizationDescriptor, |
const char * | name = nullptr |
||
) |
Adds a normalization layer to the network.
normalizationDescriptor | - NormalizationDescriptor to configure the normalization. |
name | - Optional name for the layer. |
Definition at line 382 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddOutputLayer | ( | LayerBindingId | id, |
const char * | name = nullptr |
||
) |
Adds an output layer to the network.
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. |
Definition at line 496 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddPadLayer | ( | const PadDescriptor & | padDescriptor, |
const char * | name = nullptr |
||
) |
Adds a fully pad layer to the network.
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. |
Definition at line 534 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddPermuteLayer | ( | const PermuteDescriptor & | permuteDescriptor, |
const char * | name = nullptr |
||
) |
Adds a permute layer to the network.
permuteDescriptor | - PermuteDescriptor to configure the permute. |
name | - Optional name for the layer. |
Definition at line 344 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddPooling2dLayer | ( | const Pooling2dDescriptor & | pooling2dDescriptor, |
const char * | name = nullptr |
||
) |
Adds a 2D pooling layer to the network.
pooling2dDescriptor | - Pooling2dDescriptor to configure the pooling. |
name | - Optional name for the layer. |
Definition at line 356 of file Network.cpp.
References INetwork::pNetworkImpl.
Referenced by armnn::FoldPadIntoAveragePool2d().
IConnectableLayer * AddPooling3dLayer | ( | const Pooling3dDescriptor & | pooling3dDescriptor, |
const char * | name = nullptr |
||
) |
Adds a 3D pooling layer to the network.
pooling3dDescriptor | - Pooling3dDescriptor to configure the pooling. |
name | - Optional name for the layer. |
Definition at line 362 of file Network.cpp.
References INetwork::pNetworkImpl.
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.
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. |
Definition at line 368 of file Network.cpp.
References INetwork::pNetworkImpl.
Referenced by TosaRefBackend::OptimizeSubgraphView(), and GpuFsaBackend::OptimizeSubgraphView().
IConnectableLayer * AddPreluLayer | ( | const char * | name = nullptr | ) |
Adds a PReLU layer to the network.
name | - Optional name for the layer. |
Definition at line 574 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddQLstmLayer | ( | const QLstmDescriptor & | descriptor, |
const LstmInputParams & | params, | ||
const char * | name = nullptr |
||
) |
Add a QLstm layer to the network.
descriptor | - Parameters for the QLstm operation |
params | - Weights and biases for the layer |
name | - Optional name for the layer |
Definition at line 616 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddQuantizedLstmLayer | ( | const QuantizedLstmInputParams & | params, |
const char * | name = nullptr |
||
) |
Add a QuantizedLstm layer to the network.
params | - The weights and biases for the Quantized LSTM cell |
name | - Optional name for the layer |
Definition at line 610 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddQuantizeLayer | ( | const char * | name = nullptr | ) |
Add a quantize layer to the network.
name | - Optional name for the layer. |
Definition at line 540 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddRankLayer | ( | const char * | name = nullptr | ) |
Adds a rank layer to the network.
name | - Optional name for the layer. |
Definition at line 433 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddReduceLayer | ( | const ReduceDescriptor & | reduceDescriptor, |
const char * | name = nullptr |
||
) |
Adds a reduce layer to the network.
ReduceDescriptor | - Parameters for the reduce operation. |
name | - Optional name for the layer. |
Definition at line 444 of file Network.cpp.
References INetwork::pNetworkImpl.
Referenced by armnn::ChainReduceLayers().
IConnectableLayer * AddReshapeLayer | ( | const ReshapeDescriptor & | reshapeDescriptor, |
const char * | name = nullptr |
||
) |
Adds a reshape layer to the network.
reshapeDescriptor | - Parameters for the reshape operation. |
name | - Optional name for the layer. |
Definition at line 474 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddResizeLayer | ( | const ResizeDescriptor & | resizeDescriptor, |
const char * | name = nullptr |
||
) |
Adds a resize layer to the network.
resizeDescriptor | - Parameters for the resize operation. |
name | - Optional name for the layer. |
Definition at line 438 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddReverseV2Layer | ( | const char * | name = nullptr | ) |
Add a ReverseV2 layer to the network.
name | - Optional name for the layer |
Definition at line 649 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddScatterNdLayer | ( | const ScatterNdDescriptor & | descriptor, |
const char * | name = nullptr |
||
) |
Add a ScatterNd layer to the network.
descriptor | - Parameters for the ScatterNd operation |
name | - Optional name for the layer |
Definition at line 666 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddShapeLayer | ( | const char * | name = nullptr | ) |
Adds a shape layer to the network.
name | - Optional name for the layer. |
Definition at line 593 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddSliceLayer | ( | const SliceDescriptor & | sliceDescriptor, |
const char * | name = nullptr |
||
) |
Adds a slice layer to the network.
sliceDescriptor | - SliceDescriptor to configure the slice operation. |
name | - Optional name for the layer. |
Definition at line 388 of file Network.cpp.
References INetwork::pNetworkImpl.
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
softmaxDescriptor | - SoftmaxDescriptor to configure the softmax. |
name | - Optional name for the layer. |
Definition at line 392 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddSpaceToBatchNdLayer | ( | const SpaceToBatchNdDescriptor & | spaceToBatchNdDescriptor, |
const char * | name = nullptr |
||
) |
Adds a space to batch layer to the network.
spaceToBatchNdDescriptor | - Parameters for the space to batch operation. |
name | - Optional name for the layer. |
Definition at line 480 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddSpaceToDepthLayer | ( | const SpaceToDepthDescriptor & | spaceToDepthDescriptor, |
const char * | name = nullptr |
||
) |
Adds a space to depth layer to the network.
spaceToDepthDescriptor | - Parameters for the space to depth operation. |
name | - Optional name for the layer. |
Definition at line 486 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddSplitterLayer | ( | const ViewsDescriptor & | splitterDescriptor, |
const char * | name = nullptr |
||
) |
Adds a splitter layer to the network.
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. |
Definition at line 398 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddStackLayer | ( | const StackDescriptor & | descriptor, |
const char * | name = nullptr |
||
) |
Adds a stack layer to the network.
descriptor | - Description of the stack layer. |
name | - Optional name for the layer. |
Definition at line 598 of file Network.cpp.
References INetwork::pNetworkImpl.
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.
Definition at line 604 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddStridedSliceLayer | ( | const StridedSliceDescriptor & | stridedSliceDescriptor, |
const char * | name = nullptr |
||
) |
Adds a strided slice layer to the network.
StridedSliceDescriptor | - Parameters for the strided slice operation. |
name | - Optional name for the layer. |
Definition at line 545 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddSubtractionLayer | ( | const char * | name = nullptr | ) |
Adds a subtraction layer to the network.
name | - Optional name for the layer. |
Definition at line 515 of file Network.cpp.
References ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, and INetwork::pNetworkImpl.
Referenced by armnn::FuseSubtractionLayer().
IConnectableLayer * AddSwitchLayer | ( | const char * | name = nullptr | ) |
Adds a switch layer to the network.
name | - Optional name for the layer. |
Definition at line 569 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddTileLayer | ( | const TileDescriptor & | descriptor, |
const char * | name = nullptr |
||
) |
Add a Tile layer to the network.
descriptor | - Parameters for the Tile operation |
name | - Optional name for the layer |
Definition at line 654 of file Network.cpp.
References INetwork::pNetworkImpl.
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.
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. |
Definition at line 579 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddTransposeLayer | ( | const TransposeDescriptor & | transposeDescriptor, |
const char * | name = nullptr |
||
) |
Adds a transpose layer to the network.
transposeDescriptor | - TransposeDescriptor to configure the transpose. |
name | - Optional name for the layer. |
Definition at line 587 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddUnidirectionalSequenceLstmLayer | ( | const UnidirectionalSequenceLstmDescriptor & | descriptor, |
const LstmInputParams & | params, | ||
const char * | name = nullptr |
||
) |
Add a UnidirectionalSequenceLstm layer to the network.
descriptor | - Parameters for the UnidirectionalSequenceLstm operation |
params | - Weights and biases for the UnidirectionalSequenceLstm |
name | - Optional name for the layer |
Definition at line 629 of file Network.cpp.
References INetwork::pNetworkImpl.
|
static |
Definition at line 682 of file Network.cpp.
References INetwork::CreateRaw(), and INetwork::Destroy().
|
static |
Definition at line 677 of file Network.cpp.
References INetwork::INetwork().
Referenced by INetwork::Create().
|
static |
Definition at line 687 of file Network.cpp.
Referenced by INetwork::Create().
void ExecuteStrategy | ( | IStrategy & | strategy | ) | const |
Definition at line 672 of file Network.cpp.
References INetwork::pNetworkImpl.
Referenced by ISerializer::SerializerImpl::Serialize().
Status PrintGraph | ( | ) |
Definition at line 237 of file Network.cpp.
References INetwork::pNetworkImpl.
|
friend |
|
friend |
|
friend |
Create an optimized version of the network.
network | INetwork description of the network to be optimized. |
backendPreferences | The choice of the backend ordered by user preferences. |
deviceSpec | DeviceSpec object as queried from the runtime. See IRuntime::GetDeviceSpec() |
messages | If there are failures or warnings a string describing same will be added to the vector |
options | OptimizerOptions object with optimizer configuration options |
Definition at line 2145 of file Network.cpp.
|
friend |
Definition at line 880 of file INetwork.hpp.
|
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(), armnn::Optimize(), and INetwork::PrintGraph().