22.02
|
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 ConstTensor &weights, const Optional< ConstTensor > &biases, const char *name=nullptr) |
Adds a 2D convolution layer to the network. More... | |
IConnectableLayer * | AddConvolution2dLayer (const Convolution2dDescriptor &convolution2dDescriptor, const ConstTensor &weights, const char *name=nullptr) |
IConnectableLayer * | AddConvolution2dLayer (const Convolution2dDescriptor &convolution2dDescriptor, const ConstTensor &weights, const ConstTensor &biases, const char *name=nullptr) |
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 ConstTensor &weights, const Optional< ConstTensor > &biases, 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 * | 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 * | AddFullyConnectedLayer (const FullyConnectedDescriptor &fullyConnectedDescriptor, const Optional< ConstTensor > &weights, const Optional< ConstTensor > &biases, const char *name=nullptr) |
IConnectableLayer * | AddFullyConnectedLayer (const FullyConnectedDescriptor &fullyConnectedDescriptor, const ConstTensor &weights, const Optional< ConstTensor > &biases, const char *name=nullptr) |
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 * | 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... | |
ARMNN_NO_DEPRECATE_WARN_BEGIN | ARMNN_DEPRECATED_MSG_REMOVAL_DATE ("Accept is deprecated. The ILayerVisitor that works in conjunction with this " "Accept function is deprecated. Use IStrategy in combination with " "ExecuteStrategy instead, which is an ABI/API stable version of the " "visitor pattern.", "22.05") void Accept(ILayerVisitor &visitor) const |
Apply a visitor to this layer. More... | |
ARMNN_NO_DEPRECATE_WARN_END void | ExecuteStrategy (IStrategy &strategy) const |
Static Public Member Functions | |
static INetwork * | CreateRaw (NetworkOptions networkOptions={}) |
static INetworkPtr | Create (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) |
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 249 of file INetwork.hpp.
|
protecteddefault |
Referenced by INetwork::INetwork().
|
protected |
Definition at line 45 of file Network.cpp.
References INetwork::~INetwork().
Referenced by INetwork::CreateRaw().
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 225 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 258 of file Network.cpp.
References INetwork::pNetworkImpl.
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 60 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 268 of file Network.cpp.
References INetwork::pNetworkImpl.
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 199 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 66 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 469 of file Network.cpp.
References ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, and 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 71 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 78 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 313 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddConvolution2dLayer | ( | const Convolution2dDescriptor & | convolution2dDescriptor, |
const ConstTensor & | weights, | ||
const Optional< ConstTensor > & | biases, | ||
const char * | name = nullptr |
||
) |
Adds a 2D convolution layer to the network.
convolution2dDescriptor | - Description of the 2D convolution layer. |
weights | - Tensor for the weights data. |
biases | - Optional tensor for the bias data. If specified, must match the output tensor shape. |
name | - Optional name for the layer. |
Definition at line 85 of file Network.cpp.
References INetwork::pNetworkImpl.
Referenced by TEST_SUITE().
IConnectableLayer * AddConvolution2dLayer | ( | const Convolution2dDescriptor & | convolution2dDescriptor, |
const ConstTensor & | weights, | ||
const char * | name = nullptr |
||
) |
Definition at line 94 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddConvolution2dLayer | ( | const Convolution2dDescriptor & | convolution2dDescriptor, |
const ConstTensor & | weights, | ||
const ConstTensor & | biases, | ||
const char * | name = nullptr |
||
) |
Definition at line 103 of file Network.cpp.
References INetwork::pNetworkImpl.
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 116 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 123 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddDepthwiseConvolution2dLayer | ( | const DepthwiseConvolution2dDescriptor & | convolution2dDescriptor, |
const ConstTensor & | weights, | ||
const Optional< ConstTensor > & | biases, | ||
const char * | name = nullptr |
||
) |
Adds a 2D depthwise convolution layer to the network.
convolution2dDescriptor | - Description of the 2D depthwise convolution layer. |
weights | - Tensor for the weights. Expected format: [channelMultiplier, inputChannels, height, width]. |
biases | Optional tensor for the bias data. If specified, must match the output tensor shape. |
name | - Optional name for the layer. |
Definition at line 130 of file Network.cpp.
References INetwork::pNetworkImpl.
Referenced by TEST_SUITE().
IConnectableLayer * AddDequantizeLayer | ( | const char * | name = nullptr | ) |
Adds a Dequantize layer to the network.
Definition at line 140 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 146 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 353 of file Network.cpp.
References INetwork::pNetworkImpl.
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 operation. |
Definition at line 155 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 162 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 337 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 168 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddFullyConnectedLayer | ( | const FullyConnectedDescriptor & | fullyConnectedDescriptor, |
const Optional< ConstTensor > & | weights, | ||
const Optional< ConstTensor > & | biases, | ||
const char * | name = nullptr |
||
) |
Definition at line 185 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddFullyConnectedLayer | ( | const FullyConnectedDescriptor & | fullyConnectedDescriptor, |
const ConstTensor & | weights, | ||
const Optional< ConstTensor > & | biases, | ||
const char * | name = nullptr |
||
) |
Definition at line 174 of file Network.cpp.
References INetwork::pNetworkImpl.
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 395 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 54 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 295 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 301 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 455 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 307 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 346 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 363 of file Network.cpp.
References 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 368 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 253 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 390 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddMultiplicationLayer | ( | const char * | name = nullptr | ) |
Adds a multiplication layer to the network.
name | - Optional name for the layer. |
Definition at line 263 of file Network.cpp.
References INetwork::pNetworkImpl.
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 231 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 341 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 373 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 193 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 205 of file Network.cpp.
References INetwork::pNetworkImpl.
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 211 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 217 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddPreluLayer | ( | const char * | name = nullptr | ) |
Adds a PReLU layer to the network.
name | - Optional name for the layer. |
Definition at line 406 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 448 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 442 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 379 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 278 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 289 of file Network.cpp.
References INetwork::pNetworkImpl.
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 319 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 283 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 425 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 237 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 241 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 325 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 331 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 247 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 430 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 for the StandIn layer.
Definition at line 436 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 384 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 358 of file Network.cpp.
References INetwork::pNetworkImpl.
IConnectableLayer * AddSwitchLayer | ( | const char * | name = nullptr | ) |
Adds a switch layer to the network.
name | - Optional name for the layer. |
Definition at line 401 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 411 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 419 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 461 of file Network.cpp.
References INetwork::pNetworkImpl.
ARMNN_NO_DEPRECATE_WARN_BEGIN ARMNN_DEPRECATED_MSG_REMOVAL_DATE | ( | "Accept is deprecated. The ILayerVisitor that works in conjunction with this " "Accept function is deprecated. Use IStrategy in combination with " "ExecuteStrategy | instead, |
which is an ABI/API stable version of the " "visitor pattern." | , | ||
"22.05" | |||
) | const & |
Apply a visitor to this layer.
|
static |
Definition at line 492 of file Network.cpp.
References INetwork::CreateRaw(), and INetwork::Destroy().
Referenced by armnn::experimental::CreateStridedSliceNetwork(), OptimizationViews::GetINetwork(), GetSoftmaxProfilerJson(), QLstmEndToEnd(), TEST_SUITE(), and VerifyPostOptimisationStructureTestImpl().
|
static |
Definition at line 487 of file Network.cpp.
References INetwork::INetwork().
Referenced by INetwork::Create().
|
static |
Definition at line 497 of file Network.cpp.
Referenced by INetwork::Create().
ARMNN_NO_DEPRECATE_WARN_END void ExecuteStrategy | ( | IStrategy & | strategy | ) | const |
Definition at line 482 of file Network.cpp.
References INetwork::pNetworkImpl.
Referenced by ISerializer::SerializerImpl::Serialize().
Status PrintGraph | ( | ) |
Definition at line 49 of file Network.cpp.
References INetwork::pNetworkImpl.
|
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 1680 of file Network.cpp.
|
friend |
Definition at line 767 of file INetwork.hpp.
|
protected |
Definition at line 777 of file INetwork.hpp.
Referenced by INetwork::AddActivationLayer(), INetwork::AddAdditionLayer(), INetwork::AddArgMinMaxLayer(), INetwork::AddBatchNormalizationLayer(), INetwork::AddBatchToSpaceNdLayer(), 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::AddElementwiseUnaryLayer(), INetwork::AddFillLayer(), INetwork::AddFloorLayer(), INetwork::AddFullyConnectedLayer(), INetwork::AddGatherLayer(), 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::AddShapeLayer(), INetwork::AddSliceLayer(), INetwork::AddSoftmaxLayer(), INetwork::AddSpaceToBatchNdLayer(), INetwork::AddSpaceToDepthLayer(), INetwork::AddSplitterLayer(), INetwork::AddStackLayer(), INetwork::AddStandInLayer(), INetwork::AddStridedSliceLayer(), INetwork::AddSubtractionLayer(), INetwork::AddSwitchLayer(), INetwork::AddTransposeConvolution2dLayer(), INetwork::AddTransposeLayer(), INetwork::AddUnidirectionalSequenceLstmLayer(), INetwork::ExecuteStrategy(), armnn::Optimize(), and INetwork::PrintGraph().