ArmNN
 20.05
Network Class Referencefinal

Private implementation of INetwork. More...

#include <Network.hpp>

Inheritance diagram for Network:
INetwork

Public Member Functions

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

Additional Inherited Members

- Static Public Member Functions inherited from INetwork
static INetworkCreateRaw ()
 
static INetworkPtr Create ()
 
static void Destroy (INetwork *network)
 
- Protected Member Functions inherited from INetwork
 ~INetwork ()
 

Detailed Description

Private implementation of INetwork.

Definition at line 28 of file Network.hpp.

Constructor & Destructor Documentation

◆ Network()

Network ( )

Definition at line 1151 of file Network.cpp.

1152 : m_Graph(std::make_unique<Graph>())
1153 {
1154 }

◆ ~Network()

~Network ( )

Definition at line 1156 of file Network.cpp.

1157 {
1158 }

Member Function Documentation

◆ Accept()

void Accept ( ILayerVisitor visitor) const
overridevirtual

Implements INetwork.

Definition at line 1958 of file Network.cpp.

References Network::GetGraph().

Referenced by Network::GetGraph().

1959 {
1960  for (auto layer : GetGraph())
1961  {
1962  layer->Accept(visitor);
1963  };
1964 }
const Graph & GetGraph() const
Definition: Network.hpp:34

◆ AddAbsLayer()

IConnectableLayer * AddAbsLayer ( const char *  name = nullptr)
overridevirtual

Add absolute layer to the network.

Parameters
name- Optional name for the layer. @ return - Interface for configuring the layer.

Implements INetwork.

Definition at line 1420 of file Network.cpp.

References armnn::Abs, and Network::AddElementwiseUnaryLayer().

Referenced by Network::GetGraph().

1421 {
1422  return AddElementwiseUnaryLayer(ElementwiseUnaryDescriptor(UnaryOperation::Abs), name);
1423 }
IConnectableLayer * AddElementwiseUnaryLayer(const ElementwiseUnaryDescriptor &elementwiseUnaryDescriptor, const char *name=nullptr) override
Add an ElementwiseUnary layer to the network.
Definition: Network.cpp:1183

◆ AddActivationLayer()

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

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.

Implements INetwork.

Definition at line 1368 of file Network.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), and Network::GetGraph().

1370 {
1371  return m_Graph->AddLayer<ActivationLayer>(activationDescriptor, name);
1372 }

◆ AddAdditionLayer()

IConnectableLayer * AddAdditionLayer ( const char *  name = nullptr)
overridevirtual

Adds an addition layer to the network.

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

Implements INetwork.

Definition at line 1425 of file Network.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), armnn::BOOST_AUTO_TEST_CASE(), and Network::GetGraph().

1426 {
1427  return m_Graph->AddLayer<AdditionLayer>(name);
1428 }

◆ AddArgMinMaxLayer()

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

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.

Implements INetwork.

Definition at line 1374 of file Network.cpp.

Referenced by Network::GetGraph().

1376 {
1377  return m_Graph->AddLayer<ArgMinMaxLayer>(argMinMaxDescriptor, name);
1378 }

◆ AddBatchNormalizationLayer()

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

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.

Implements INetwork.

Definition at line 1440 of file Network.cpp.

References BatchNormalizationLayer::m_Mean.

Referenced by BOOST_AUTO_TEST_CASE(), armnn::BOOST_AUTO_TEST_CASE(), and Network::GetGraph().

1446 {
1447  const auto layer = m_Graph->AddLayer<BatchNormalizationLayer>(desc, name);
1448 
1449  layer->m_Mean = std::make_unique<ScopedCpuTensorHandle>(mean);
1450  layer->m_Variance = std::make_unique<ScopedCpuTensorHandle>(variance);
1451  layer->m_Beta = std::make_unique<ScopedCpuTensorHandle>(beta);
1452  layer->m_Gamma = std::make_unique<ScopedCpuTensorHandle>(gamma);
1453 
1454  return layer;
1455 }

◆ AddBatchToSpaceNdLayer()

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

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.

Implements INetwork.

Definition at line 1171 of file Network.cpp.

Referenced by Network::GetGraph().

1173 {
1174  return m_Graph->AddLayer<BatchToSpaceNdLayer>(batchToSpaceNdDescriptor, name);
1175 }

◆ AddComparisonLayer()

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

Add a Comparison layer to the network.

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

Implements INetwork.

Definition at line 1177 of file Network.cpp.

Referenced by Network::AddEqualLayer(), Network::AddGreaterLayer(), and Network::GetGraph().

1179 {
1180  return m_Graph->AddLayer<ComparisonLayer>(comparisonDescriptor, name);
1181 }

◆ AddConcatLayer()

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

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.

Implements INetwork.

Definition at line 1236 of file Network.cpp.

References OptionalBase::has_value(), Convolution2dDescriptor::m_BiasEnabled, Convolution2dLayer::m_Weight, and OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by Network::AddMergerLayer(), BOOST_AUTO_TEST_CASE(), and Network::GetGraph().

1238 {
1239  return m_Graph->AddLayer<ConcatLayer>(concatDescriptor, name);
1240 }

◆ AddConstantLayer()

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

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.

Implements INetwork.

Definition at line 1493 of file Network.cpp.

References ConstantLayer::m_LayerOutput.

Referenced by armnn::BOOST_AUTO_TEST_CASE(), and Network::GetGraph().

1494 {
1495  auto layer = m_Graph->AddLayer<ConstantLayer>(name);
1496 
1497  layer->m_LayerOutput = std::make_unique<ScopedCpuTensorHandle>(input);
1498 
1499  return layer;
1500 }

◆ AddConvolution2dLayer() [1/3]

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

Adds a 2D convolution layer to the network.

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

Implements INetwork.

Definition at line 1264 of file Network.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), armnn::BOOST_AUTO_TEST_CASE(), and Network::GetGraph().

1268 {
1269  return AddConvolution2dLayerImpl(convolution2dDescriptor, weights, biases, name);
1270 }

◆ AddConvolution2dLayer() [2/3]

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

Implements INetwork.

Definition at line 1272 of file Network.cpp.

1275 {
1276  Optional<ConstTensor> biases;
1277  return AddConvolution2dLayerImpl(convolution2dDescriptor, weights, biases, name);
1278 }

◆ AddConvolution2dLayer() [3/3]

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

Implements INetwork.

Definition at line 1280 of file Network.cpp.

References OptionalBase::has_value(), DepthwiseConvolution2dDescriptor::m_BiasEnabled, DepthwiseConvolution2dLayer::m_Weight, and OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

1284 {
1285  Optional<ConstTensor> optionalBiases(biases);
1286  return AddConvolution2dLayerImpl(convolution2dDescriptor, weights, optionalBiases, name);
1287 }

◆ AddDepthToSpaceLayer()

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

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.

Implements INetwork.

Definition at line 1312 of file Network.cpp.

Referenced by Network::GetGraph().

1314 {
1315  return m_Graph->AddLayer<DepthToSpaceLayer>(depthToSpaceDescriptor, name);
1316 }

◆ AddDepthwiseConvolution2dLayer() [1/3]

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

Adds a 2D depthwise convolution layer to the network.

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

Implements INetwork.

Definition at line 1318 of file Network.cpp.

Referenced by armnn::BOOST_AUTO_TEST_CASE(), and Network::GetGraph().

1323 {
1324  return AddDepthwiseConvolution2dLayerImpl(convolution2dDescriptor, weights, biases, name);
1325 }

◆ AddDepthwiseConvolution2dLayer() [2/3]

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

Implements INetwork.

Definition at line 1327 of file Network.cpp.

1331 {
1332  Optional<ConstTensor> biases;
1333  return AddDepthwiseConvolution2dLayerImpl(convolution2dDescriptor, weights, biases, name);
1334 }

◆ AddDepthwiseConvolution2dLayer() [3/3]

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

Implements INetwork.

Definition at line 1336 of file Network.cpp.

1341 {
1342  Optional<ConstTensor> optionalBiases(biases);
1343  return AddDepthwiseConvolution2dLayerImpl(convolution2dDescriptor, weights, optionalBiases, name);
1344 }

◆ AddDequantizeLayer()

IConnectableLayer * AddDequantizeLayer ( const char *  name = nullptr)
overridevirtual

Adds a Dequantize layer to the network.

Returns
- Interface for configuring the layer.

Implements INetwork.

Definition at line 1691 of file Network.cpp.

Referenced by Network::GetGraph().

1692 {
1693  return m_Graph->AddLayer<DequantizeLayer>(name);
1694 }

◆ AddDetectionPostProcessLayer()

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

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.

Implements INetwork.

Definition at line 1346 of file Network.cpp.

References anchors(), and DetectionPostProcessLayer::m_Anchors.

Referenced by Network::GetGraph().

1348 {
1349  const auto layer = m_Graph->AddLayer<DetectionPostProcessLayer>(descriptor, name);
1350 
1351  layer->m_Anchors = std::make_unique<ScopedCpuTensorHandle>(anchors);
1352 
1353  return layer;
1354 }
std::vector< float > anchors({ 0.5f, 0.5f, 1.0f, 1.0f, 0.5f, 0.5f, 1.0f, 1.0f, 0.5f, 0.5f, 1.0f, 1.0f, 0.5f, 10.5f, 1.0f, 1.0f, 0.5f, 10.5f, 1.0f, 1.0f, 0.5f, 100.5f, 1.0f, 1.0f })

◆ AddDivisionLayer()

IConnectableLayer * AddDivisionLayer ( const char *  name = nullptr)
overridevirtual

Adds a division layer to the network.

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

Implements INetwork.

Definition at line 1666 of file Network.cpp.

Referenced by Network::GetGraph().

1667 {
1668  return m_Graph->AddLayer<DivisionLayer>(name);
1669 }

◆ AddElementwiseUnaryLayer()

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

Add an ElementwiseUnary layer to the network.

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

Implements INetwork.

Definition at line 1183 of file Network.cpp.

References OptionalBase::has_value(), FullyConnectedDescriptor::m_BiasEnabled, FullyConnectedLayer::m_Weight, and OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by Network::AddAbsLayer(), Network::AddRsqrtLayer(), and Network::GetGraph().

1185 {
1186  return m_Graph->AddLayer<ElementwiseUnaryLayer>(elementwiseUnaryDescriptor, name);
1187 }

◆ AddEqualLayer()

IConnectableLayer * AddEqualLayer ( const char *  name = nullptr)
overridevirtual

Add a Equal layer to the network.

Parameters
name- Optional name for the layer. @ return - Interface for configuring the layer.

Implements INetwork.

Definition at line 1707 of file Network.cpp.

References Network::AddComparisonLayer(), and armnn::Equal.

Referenced by Network::GetGraph().

1708 {
1709  return AddComparisonLayer(ComparisonDescriptor(ComparisonOperation::Equal), name);
1710 }
IConnectableLayer * AddComparisonLayer(const ComparisonDescriptor &comparisonDescriptor, const char *name=nullptr) override
Add a Comparison layer to the network.
Definition: Network.cpp:1177

◆ AddFloorLayer()

IConnectableLayer * AddFloorLayer ( const char *  name = nullptr)
overridevirtual

Adds a floor layer to the network.

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

Implements INetwork.

Definition at line 1520 of file Network.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), and Network::GetGraph().

1521 {
1522  return m_Graph->AddLayer<FloorLayer>(name);
1523 }

◆ AddFullyConnectedLayer() [1/3]

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

Adds a fully connected layer to the network.

Parameters
fullyConnectedDescriptor- Description of the fully connected 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.

Implements INetwork.

Definition at line 1211 of file Network.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), armnn::BOOST_AUTO_TEST_CASE(), and Network::GetGraph().

1215 {
1216  return AddFullyConnectedLayerImpl(fullyConnectedDescriptor, weights, biases, name);
1217 }

◆ AddFullyConnectedLayer() [2/3]

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

Implements INetwork.

Definition at line 1219 of file Network.cpp.

1222 {
1223  Optional<ConstTensor> biases;
1224  return AddFullyConnectedLayerImpl(fullyConnectedDescriptor, weights, biases, name);
1225 }

◆ AddFullyConnectedLayer() [3/3]

IConnectableLayer * AddFullyConnectedLayer ( const FullyConnectedDescriptor fullyConnectedDescriptor,
const ConstTensor weights,
const ConstTensor biases,
const char *  name = nullptr 
)
overridevirtual

Implements INetwork.

Definition at line 1227 of file Network.cpp.

1231 {
1232  Optional<ConstTensor> optionalBiases(biases);
1233  return AddFullyConnectedLayerImpl(fullyConnectedDescriptor, weights, optionalBiases, name);
1234 }

◆ AddGatherLayer()

IConnectableLayer * AddGatherLayer ( const char *  name = nullptr)
overridevirtual

Add Gather layer to the network.

Parameters
name- Optional name for the layer. @ return - Interface for configuring the layer.

Implements INetwork.

Definition at line 1717 of file Network.cpp.

Referenced by Network::GetGraph().

1718 {
1719  return m_Graph->AddLayer<GatherLayer>(name);
1720 }

◆ AddGreaterLayer()

IConnectableLayer * AddGreaterLayer ( const char *  name = nullptr)
overridevirtual

Add a Greater layer to the network.

Parameters
name- Optional name for the layer. @ return - Interface for configuring the layer.

Implements INetwork.

Definition at line 1702 of file Network.cpp.

References Network::AddComparisonLayer(), and armnn::Greater.

Referenced by Network::GetGraph().

1703 {
1704  return AddComparisonLayer(ComparisonDescriptor(ComparisonOperation::Greater), name);
1705 }
IConnectableLayer * AddComparisonLayer(const ComparisonDescriptor &comparisonDescriptor, const char *name=nullptr) override
Add a Comparison layer to the network.
Definition: Network.cpp:1177

◆ AddInputLayer()

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

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.

Implements INetwork.

Definition at line 1166 of file Network.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), armnn::BOOST_AUTO_TEST_CASE(), and Network::GetGraph().

1167 {
1168  return m_Graph->AddLayer<InputLayer>(id, name);
1169 }

◆ AddInstanceNormalizationLayer()

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

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.

Implements INetwork.

Definition at line 1475 of file Network.cpp.

Referenced by Network::GetGraph().

1477 {
1478  return m_Graph->AddLayer<InstanceNormalizationLayer>(desc, name);
1479 }

◆ AddL2NormalizationLayer()

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

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.

Implements INetwork.

Definition at line 1481 of file Network.cpp.

Referenced by Network::GetGraph().

1483 {
1484  return m_Graph->AddLayer<L2NormalizationLayer>(desc, name);
1485 }

◆ AddLogSoftmaxLayer()

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

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.

Implements INetwork.

Definition at line 1487 of file Network.cpp.

Referenced by Network::GetGraph().

1489 {
1490  return m_Graph->AddLayer<LogSoftmaxLayer>(desc, name);
1491 }

◆ AddLstmLayer()

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

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.

Implements INetwork.

Definition at line 1525 of file Network.cpp.

References LstmLayer::m_BasicParameters, LstmInputParams::m_CellBias, LstmInputParams::m_CellLayerNormWeights, LstmInputParams::m_CellToForgetWeights, LstmInputParams::m_CellToInputWeights, LstmInputParams::m_CellToOutputWeights, LstmInputParams::m_ForgetGateBias, LstmInputParams::m_ForgetLayerNormWeights, LstmInputParams::m_InputGateBias, LstmInputParams::m_InputLayerNormWeights, LstmInputParams::m_InputToCellWeights, LstmInputParams::m_InputToForgetWeights, LstmBasicParameters::m_InputToForgetWeights, LstmInputParams::m_InputToInputWeights, LstmInputParams::m_InputToOutputWeights, LstmInputParams::m_OutputGateBias, LstmInputParams::m_OutputLayerNormWeights, LstmInputParams::m_ProjectionBias, LstmInputParams::m_ProjectionWeights, LstmInputParams::m_RecurrentToCellWeights, LstmInputParams::m_RecurrentToForgetWeights, LstmInputParams::m_RecurrentToInputWeights, and LstmInputParams::m_RecurrentToOutputWeights.

Referenced by armnn::BOOST_AUTO_TEST_CASE(), and Network::GetGraph().

1528 {
1529  const auto layer = m_Graph->AddLayer<LstmLayer>(descriptor, name);
1530 
1531  //Lstm Basic Parameters
1532  layer->m_BasicParameters.m_InputToForgetWeights =
1533  std::make_unique<ScopedCpuTensorHandle>(*(params.m_InputToForgetWeights));
1534  layer->m_BasicParameters.m_InputToCellWeights =
1535  std::make_unique<ScopedCpuTensorHandle>(*(params.m_InputToCellWeights));
1536  layer->m_BasicParameters.m_InputToOutputWeights =
1537  std::make_unique<ScopedCpuTensorHandle>(*(params.m_InputToOutputWeights));
1538  layer->m_BasicParameters.m_RecurrentToForgetWeights =
1539  std::make_unique<ScopedCpuTensorHandle>(*(params.m_RecurrentToForgetWeights));
1540  layer->m_BasicParameters.m_RecurrentToCellWeights =
1541  std::make_unique<ScopedCpuTensorHandle>(*(params.m_RecurrentToCellWeights));
1542  layer->m_BasicParameters.m_RecurrentToOutputWeights =
1543  std::make_unique<ScopedCpuTensorHandle>(*(params.m_RecurrentToOutputWeights));
1544  layer->m_BasicParameters.m_ForgetGateBias =
1545  std::make_unique<ScopedCpuTensorHandle>(*(params.m_ForgetGateBias));
1546  layer->m_BasicParameters.m_CellBias =
1547  std::make_unique<ScopedCpuTensorHandle>(*(params.m_CellBias));
1548  layer->m_BasicParameters.m_OutputGateBias =
1549  std::make_unique<ScopedCpuTensorHandle>(*(params.m_OutputGateBias));
1550 
1551  //Lstm Cifg parameters
1552  if(!descriptor.m_CifgEnabled)
1553  {
1554  if(params.m_InputToInputWeights == nullptr)
1555  {
1556  throw InvalidArgumentException("AddLstmLayer: Input To Input Weights cannot be NULL "
1557  "when CIFG is disabled.");
1558  }
1559  if(params.m_RecurrentToInputWeights == nullptr)
1560  {
1561  throw InvalidArgumentException(
1562  "AddLstmLayer: Recurrent To Input Weights cannot be NULL "
1563  "when CIFG is disabled.");
1564  }
1565  if(params.m_InputGateBias == nullptr)
1566  {
1567  throw InvalidArgumentException("AddLstmLayer: Input Gate Bias cannot be NULL "
1568  "when CIFG is disabled.");
1569  }
1570  layer->m_CifgParameters.m_InputToInputWeights =
1571  std::make_unique<ScopedCpuTensorHandle>(*(params.m_InputToInputWeights));
1572  layer->m_CifgParameters.m_RecurrentToInputWeights =
1573  std::make_unique<ScopedCpuTensorHandle>(*(params.m_RecurrentToInputWeights));
1574  layer->m_CifgParameters.m_InputGateBias =
1575  std::make_unique<ScopedCpuTensorHandle>(*(params.m_InputGateBias));
1576  }
1577 
1578  //Lstm projection parameters
1579  if(descriptor.m_ProjectionEnabled)
1580  {
1581  if(params.m_ProjectionWeights == nullptr)
1582  {
1583  throw InvalidArgumentException("AddLstmLayer: Projection Weights cannot be NULL "
1584  "when projection is enabled.");
1585  }
1586  layer->m_ProjectionParameters.m_ProjectionWeights =
1587  std::make_unique<ScopedCpuTensorHandle>(*(params.m_ProjectionWeights));
1588  if(params.m_ProjectionBias != nullptr)
1589  {
1590  layer->m_ProjectionParameters.m_ProjectionBias =
1591  std::make_unique<ScopedCpuTensorHandle>(*(params.m_ProjectionBias));
1592  }
1593  }
1594 
1595  //Lstm Peephole params
1596  if(descriptor.m_PeepholeEnabled)
1597  {
1598  if(!descriptor.m_CifgEnabled)
1599  {
1600  if(params.m_CellToInputWeights == nullptr)
1601  {
1602  throw InvalidArgumentException("AddLstmLayer: Cell To Input Weights cannot be NULL "
1603  "when Peephole is enabled and CIFG disabled.");
1604  }
1605 
1606  layer->m_PeepholeParameters.m_CellToInputWeights =
1607  std::make_unique<ScopedCpuTensorHandle>(*(params.m_CellToInputWeights));
1608  }
1609 
1610  if(params.m_CellToForgetWeights == nullptr)
1611  {
1612  throw InvalidArgumentException("AddLstmLayer: Cell To Forget Weights cannot be NULL "
1613  "when Peephole is enabled.");
1614  }
1615  if(params.m_CellToOutputWeights == nullptr)
1616  {
1617  throw InvalidArgumentException("AddLstmLayer: Cell To Output Weights cannot be NULL "
1618  "when Peephole is enabled.");
1619  }
1620 
1621  layer->m_PeepholeParameters.m_CellToForgetWeights =
1622  std::make_unique<ScopedCpuTensorHandle>(*(params.m_CellToForgetWeights));
1623  layer->m_PeepholeParameters.m_CellToOutputWeights =
1624  std::make_unique<ScopedCpuTensorHandle>(*(params.m_CellToOutputWeights));
1625  }
1626 
1627  //Lstm Layer Normalization params
1628  if(descriptor.m_LayerNormEnabled)
1629  {
1630  if(!descriptor.m_CifgEnabled)
1631  {
1632  if(params.m_InputLayerNormWeights == nullptr)
1633  {
1634  throw InvalidArgumentException("AddLstmLayer: Input layer normalization weights cannot be NULL "
1635  "when layer normalization is enabled and CIFG disabled.");
1636  }
1637  layer->m_LayerNormParameters.m_InputLayerNormWeights =
1638  std::make_unique<ScopedCpuTensorHandle>(*(params.m_InputLayerNormWeights));
1639  }
1640 
1641  if(params.m_ForgetLayerNormWeights == nullptr)
1642  {
1643  throw InvalidArgumentException("AddLstmLayer: Forget layer normalization weights cannot be NULL "
1644  "when layer normalization is enabled.");
1645  }
1646  if(params.m_CellLayerNormWeights == nullptr)
1647  {
1648  throw InvalidArgumentException("AddLstmLayer: Cell layer normalization weights cannot be NULL "
1649  "when layer normalization is enabled.");
1650  }
1651  if(params.m_OutputLayerNormWeights == nullptr)
1652  {
1653  throw InvalidArgumentException("AddLstmLayer: Output layer normalization weights cannot be NULL "
1654  "when layer normalization is enabled.");
1655  }
1656  layer->m_LayerNormParameters.m_ForgetLayerNormWeights =
1657  std::make_unique<ScopedCpuTensorHandle>(*(params.m_ForgetLayerNormWeights));
1658  layer->m_LayerNormParameters.m_CellLayerNormWeights =
1659  std::make_unique<ScopedCpuTensorHandle>(*(params.m_CellLayerNormWeights));
1660  layer->m_LayerNormParameters.m_OutputLayerNormWeights =
1661  std::make_unique<ScopedCpuTensorHandle>(*(params.m_OutputLayerNormWeights));
1662  }
1663  return layer;
1664 }

◆ AddMaximumLayer()

IConnectableLayer * AddMaximumLayer ( const char *  name = nullptr)
overridevirtual

Add a Maximum layer to the network.

Parameters
name- Optional name for the layer. @ return - Interface for configuring the layer.

Implements INetwork.

Definition at line 1404 of file Network.cpp.

Referenced by Network::GetGraph().

1405 {
1406  return m_Graph->AddLayer<MaximumLayer>(name);
1407 }

◆ AddMeanLayer()

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

Add a Mean layer to the network.

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

Implements INetwork.

Definition at line 1676 of file Network.cpp.

Referenced by Network::GetGraph().

1677 {
1678  return m_Graph->AddLayer<MeanLayer>(meanDescriptor,name);
1679 }

◆ AddMergeLayer()

IConnectableLayer * AddMergeLayer ( const char *  name = nullptr)
overridevirtual

Adds a merge layer to the network.

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

Implements INetwork.

Definition at line 1722 of file Network.cpp.

Referenced by Network::GetGraph().

1723 {
1724  return m_Graph->AddLayer<MergeLayer>(name);
1725 }

◆ AddMergerLayer()

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

Adds a concat layer to the network.

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

Implements INetwork.

Definition at line 1414 of file Network.cpp.

References Network::AddConcatLayer().

Referenced by Network::GetGraph().

1416 {
1417  return AddConcatLayer(mergerDescriptor, name);
1418 }
IConnectableLayer * AddConcatLayer(const ConcatDescriptor &concatDescriptor, const char *name=nullptr) override
Adds a concatenation layer to the network.
Definition: Network.cpp:1236

◆ AddMinimumLayer()

IConnectableLayer * AddMinimumLayer ( const char *  name = nullptr)
overridevirtual

Add a Minimum layer to the network.

Parameters
name- Optional name for the layer. @ return - Interface for configuring the layer.

Implements INetwork.

Definition at line 1409 of file Network.cpp.

Referenced by Network::GetGraph().

1410 {
1411  return m_Graph->AddLayer<MinimumLayer>(name);
1412 }

◆ AddMultiplicationLayer()

IConnectableLayer * AddMultiplicationLayer ( const char *  name = nullptr)
overridevirtual

Adds a multiplication layer to the network.

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

Implements INetwork.

Definition at line 1430 of file Network.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), and Network::GetGraph().

1431 {
1432  return m_Graph->AddLayer<MultiplicationLayer>(name);
1433 }

◆ AddNormalizationLayer()

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

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.

Implements INetwork.

Definition at line 1380 of file Network.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), and Network::GetGraph().

1383 {
1384  return m_Graph->AddLayer<NormalizationLayer>(normalizationDescriptor, name);
1385 }

◆ AddOutputLayer()

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

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.

Implements INetwork.

Definition at line 1435 of file Network.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), armnn::BOOST_AUTO_TEST_CASE(), and Network::GetGraph().

1436 {
1437  return m_Graph->AddLayer<OutputLayer>(id, name);
1438 }

◆ AddPadLayer()

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

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.

Implements INetwork.

Definition at line 1681 of file Network.cpp.

Referenced by Network::GetGraph().

1682 {
1683  return m_Graph->AddLayer<PadLayer>(padDescriptor,name);
1684 }

◆ AddPermuteLayer()

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

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.

Implements INetwork.

Definition at line 1356 of file Network.cpp.

Referenced by Network::GetGraph().

1358 {
1359  return m_Graph->AddLayer<PermuteLayer>(permuteDescriptor, name);
1360 }

◆ AddPooling2dLayer()

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

Adds a pooling layer to the network.

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

Implements INetwork.

Definition at line 1362 of file Network.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), and Network::GetGraph().

1364 {
1365  return m_Graph->AddLayer<Pooling2dLayer>(pooling2dDescriptor, name);
1366 }

◆ AddPreluLayer()

IConnectableLayer * AddPreluLayer ( const char *  name = nullptr)
overridevirtual

Adds a PReLU layer to the network.

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

Implements INetwork.

Definition at line 1732 of file Network.cpp.

Referenced by Network::GetGraph().

1733 {
1734  return m_Graph->AddLayer<PreluLayer>(name);
1735 }

◆ AddQLstmLayer()

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

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.

Implements INetwork.

Definition at line 1816 of file Network.cpp.

References QLstmLayer::m_BasicParameters, LstmInputParams::m_CellBias, LstmInputParams::m_CellLayerNormWeights, LstmInputParams::m_CellToForgetWeights, LstmInputParams::m_CellToInputWeights, LstmInputParams::m_CellToOutputWeights, LstmInputParams::m_ForgetGateBias, LstmInputParams::m_ForgetLayerNormWeights, LstmInputParams::m_InputGateBias, LstmInputParams::m_InputLayerNormWeights, LstmInputParams::m_InputToCellWeights, QLstmBasicParameters::m_InputToForgetWeights, LstmInputParams::m_InputToForgetWeights, LstmInputParams::m_InputToInputWeights, LstmInputParams::m_InputToOutputWeights, LstmInputParams::m_OutputGateBias, LstmInputParams::m_OutputLayerNormWeights, LstmInputParams::m_ProjectionBias, LstmInputParams::m_ProjectionWeights, LstmInputParams::m_RecurrentToCellWeights, LstmInputParams::m_RecurrentToForgetWeights, LstmInputParams::m_RecurrentToInputWeights, and LstmInputParams::m_RecurrentToOutputWeights.

Referenced by armnn::BOOST_AUTO_TEST_CASE(), and Network::GetGraph().

1819 {
1820  const auto layer = m_Graph->AddLayer<QLstmLayer>(descriptor, name);
1821 
1822  // QLstm Basic Parameters
1823  layer->m_BasicParameters.m_InputToForgetWeights =
1824  std::make_unique<ScopedCpuTensorHandle>(*(params.m_InputToForgetWeights));
1825  layer->m_BasicParameters.m_InputToCellWeights =
1826  std::make_unique<ScopedCpuTensorHandle>(*(params.m_InputToCellWeights));
1827  layer->m_BasicParameters.m_InputToOutputWeights =
1828  std::make_unique<ScopedCpuTensorHandle>(*(params.m_InputToOutputWeights));
1829  layer->m_BasicParameters.m_RecurrentToForgetWeights =
1830  std::make_unique<ScopedCpuTensorHandle>(*(params.m_RecurrentToForgetWeights));
1831  layer->m_BasicParameters.m_RecurrentToCellWeights =
1832  std::make_unique<ScopedCpuTensorHandle>(*(params.m_RecurrentToCellWeights));
1833  layer->m_BasicParameters.m_RecurrentToOutputWeights =
1834  std::make_unique<ScopedCpuTensorHandle>(*(params.m_RecurrentToOutputWeights));
1835  layer->m_BasicParameters.m_ForgetGateBias =
1836  std::make_unique<ScopedCpuTensorHandle>(*(params.m_ForgetGateBias));
1837  layer->m_BasicParameters.m_CellBias =
1838  std::make_unique<ScopedCpuTensorHandle>(*(params.m_CellBias));
1839  layer->m_BasicParameters.m_OutputGateBias =
1840  std::make_unique<ScopedCpuTensorHandle>(*(params.m_OutputGateBias));
1841 
1842  // QLstm Cifg parameters
1843  if(!descriptor.m_CifgEnabled)
1844  {
1845  if(params.m_InputToInputWeights == nullptr)
1846  {
1847  throw InvalidArgumentException("AddQLstmLayer: Input To Input Weights cannot be NULL");
1848  }
1849 
1850  if(params.m_RecurrentToInputWeights == nullptr)
1851  {
1852  throw InvalidArgumentException(
1853  "AddQLstmLayer: Recurrent To Input Weights cannot be NULL");
1854  }
1855 
1856  if(params.m_InputGateBias == nullptr)
1857  {
1858  throw InvalidArgumentException("AddQLstmLayer: Input Gate Bias cannot be NULL");
1859  }
1860 
1861  layer->m_CifgParameters.m_InputToInputWeights =
1862  std::make_unique<ScopedCpuTensorHandle>(*(params.m_InputToInputWeights));
1863  layer->m_CifgParameters.m_RecurrentToInputWeights =
1864  std::make_unique<ScopedCpuTensorHandle>(*(params.m_RecurrentToInputWeights));
1865  layer->m_CifgParameters.m_InputGateBias =
1866  std::make_unique<ScopedCpuTensorHandle>(*(params.m_InputGateBias));
1867  }
1868 
1869  // QLstm Projection parameters
1870  if(descriptor.m_ProjectionEnabled)
1871  {
1872  if(params.m_ProjectionWeights == nullptr)
1873  {
1874  throw InvalidArgumentException("AddQLstmLayer: Projection Weights cannot be NULL");
1875  }
1876 
1877  layer->m_ProjectionParameters.m_ProjectionWeights =
1878  std::make_unique<ScopedCpuTensorHandle>(*(params.m_ProjectionWeights));
1879 
1880  // Projection bias is optional even if projection is enabled
1881  if(params.m_ProjectionWeights != nullptr)
1882  {
1883  layer->m_ProjectionParameters.m_ProjectionBias =
1884  std::make_unique<ScopedCpuTensorHandle>(*(params.m_ProjectionBias));
1885  }
1886 
1887  }
1888 
1889  // QLstm Peephole params
1890  if(descriptor.m_PeepholeEnabled)
1891  {
1892  if(params.m_CellToForgetWeights == nullptr)
1893  {
1894  throw InvalidArgumentException("AddQLstmLayer: Cell To Forget Weights cannot be NULL");
1895  }
1896 
1897  if(params.m_CellToOutputWeights == nullptr)
1898  {
1899  throw InvalidArgumentException("AddQLstmLayer: Cell To Output Weights cannot be NULL");
1900  }
1901 
1902  if(!descriptor.m_CifgEnabled)
1903  {
1904  if(params.m_CellToInputWeights == nullptr)
1905  {
1906  throw InvalidArgumentException("AddQLstmLayer: Cell To Input Weights cannot be NULL");
1907  }
1908 
1909  layer->m_PeepholeParameters.m_CellToInputWeights =
1910  std::make_unique<ScopedCpuTensorHandle>(*(params.m_CellToInputWeights));
1911  }
1912 
1913  layer->m_PeepholeParameters.m_CellToForgetWeights =
1914  std::make_unique<ScopedCpuTensorHandle>(*(params.m_CellToForgetWeights));
1915  layer->m_PeepholeParameters.m_CellToOutputWeights =
1916  std::make_unique<ScopedCpuTensorHandle>(*(params.m_CellToOutputWeights));
1917  }
1918 
1919  // QLstm Layer Normalization params
1920  if(descriptor.m_LayerNormEnabled)
1921  {
1922  if(params.m_ForgetLayerNormWeights == nullptr)
1923  {
1924  throw InvalidArgumentException("AddQLstmLayer: Forget layer normalization weights cannot be NULL");
1925  }
1926 
1927  if(params.m_CellLayerNormWeights == nullptr)
1928  {
1929  throw InvalidArgumentException("AddQLstmLayer: Cell layer normalization weights cannot be NULL");
1930  }
1931 
1932  if(params.m_OutputLayerNormWeights == nullptr)
1933  {
1934  throw InvalidArgumentException("AddQLstmLayer: Output layer normalization weights cannot be NULL");
1935  }
1936 
1937  if(!descriptor.m_CifgEnabled)
1938  {
1939  if(params.m_InputLayerNormWeights == nullptr)
1940  {
1941  throw InvalidArgumentException("AddQLstmLayer: Input layer normalization weights cannot be NULL");
1942  }
1943 
1944  layer->m_LayerNormParameters.m_InputLayerNormWeights =
1945  std::make_unique<ScopedCpuTensorHandle>(*(params.m_InputLayerNormWeights));
1946  }
1947 
1948  layer->m_LayerNormParameters.m_ForgetLayerNormWeights =
1949  std::make_unique<ScopedCpuTensorHandle>(*(params.m_ForgetLayerNormWeights));
1950  layer->m_LayerNormParameters.m_CellLayerNormWeights =
1951  std::make_unique<ScopedCpuTensorHandle>(*(params.m_CellLayerNormWeights));
1952  layer->m_LayerNormParameters.m_OutputLayerNormWeights =
1953  std::make_unique<ScopedCpuTensorHandle>(*(params.m_OutputLayerNormWeights));
1954  }
1955  return layer;
1956 }

◆ AddQuantizedLstmLayer()

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

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.

Implements INetwork.

Definition at line 1778 of file Network.cpp.

References QuantizedLstmInputParams::GetCellBias(), QuantizedLstmInputParams::GetForgetGateBias(), QuantizedLstmInputParams::GetInputGateBias(), QuantizedLstmInputParams::GetInputToCellWeights(), QuantizedLstmInputParams::GetInputToForgetWeights(), QuantizedLstmInputParams::GetInputToInputWeights(), QuantizedLstmInputParams::GetInputToOutputWeights(), QuantizedLstmInputParams::GetOutputGateBias(), QuantizedLstmInputParams::GetRecurrentToCellWeights(), QuantizedLstmInputParams::GetRecurrentToForgetWeights(), QuantizedLstmInputParams::GetRecurrentToInputWeights(), QuantizedLstmInputParams::GetRecurrentToOutputWeights(), QuantizedLstmParameters::m_InputToInputWeights, and QuantizedLstmLayer::m_QuantizedLstmParameters.

Referenced by armnn::BOOST_AUTO_TEST_CASE(), and Network::GetGraph().

1780 {
1781  const auto layer = m_Graph->AddLayer<QuantizedLstmLayer>(name);
1782 
1783  // InputToX weights
1784  layer->m_QuantizedLstmParameters.m_InputToInputWeights =
1785  std::make_unique<ScopedCpuTensorHandle>(params.GetInputToInputWeights());
1786  layer->m_QuantizedLstmParameters.m_InputToForgetWeights =
1787  std::make_unique<ScopedCpuTensorHandle>(params.GetInputToForgetWeights());
1788  layer->m_QuantizedLstmParameters.m_InputToCellWeights =
1789  std::make_unique<ScopedCpuTensorHandle>(params.GetInputToCellWeights());
1790  layer->m_QuantizedLstmParameters.m_InputToOutputWeights =
1791  std::make_unique<ScopedCpuTensorHandle>(params.GetInputToOutputWeights());
1792 
1793  // RecurrentToX weights
1794  layer->m_QuantizedLstmParameters.m_RecurrentToInputWeights =
1795  std::make_unique<ScopedCpuTensorHandle>(params.GetRecurrentToInputWeights());
1796  layer->m_QuantizedLstmParameters.m_RecurrentToForgetWeights =
1797  std::make_unique<ScopedCpuTensorHandle>(params.GetRecurrentToForgetWeights());
1798  layer->m_QuantizedLstmParameters.m_RecurrentToCellWeights =
1799  std::make_unique<ScopedCpuTensorHandle>(params.GetRecurrentToCellWeights());
1800  layer->m_QuantizedLstmParameters.m_RecurrentToOutputWeights =
1801  std::make_unique<ScopedCpuTensorHandle>(params.GetRecurrentToOutputWeights());
1802 
1803  // Bias
1804  layer->m_QuantizedLstmParameters.m_InputGateBias =
1805  std::make_unique<ScopedCpuTensorHandle>(params.GetInputGateBias());
1806  layer->m_QuantizedLstmParameters.m_ForgetGateBias =
1807  std::make_unique<ScopedCpuTensorHandle>(params.GetForgetGateBias());
1808  layer->m_QuantizedLstmParameters.m_CellBias =
1809  std::make_unique<ScopedCpuTensorHandle>(params.GetCellBias());
1810  layer->m_QuantizedLstmParameters.m_OutputGateBias =
1811  std::make_unique<ScopedCpuTensorHandle>(params.GetOutputGateBias());
1812 
1813  return layer;
1814 }

◆ AddQuantizeLayer()

IConnectableLayer * AddQuantizeLayer ( const char *  name = nullptr)
overridevirtual

Add a quantize layer to the network.

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

Implements INetwork.

Definition at line 1686 of file Network.cpp.

Referenced by Network::GetGraph().

1687 {
1688  return m_Graph->AddLayer<QuantizeLayer>(name);
1689 }

◆ AddReshapeLayer()

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

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.

Implements INetwork.

Definition at line 1502 of file Network.cpp.

Referenced by Network::GetGraph().

1504 {
1505  return m_Graph->AddLayer<ReshapeLayer>(reshapeDescriptor, name);
1506 }

◆ AddResizeBilinearLayer()

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

Adds a resize bilinear layer to the network.

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

Implements INetwork.

Definition at line 1457 of file Network.cpp.

References armnn::Bilinear, ResizeBilinearDescriptor::m_DataLayout, ResizeDescriptor::m_DataLayout, ResizeDescriptor::m_Method, ResizeBilinearDescriptor::m_TargetHeight, ResizeDescriptor::m_TargetHeight, ResizeBilinearDescriptor::m_TargetWidth, and ResizeDescriptor::m_TargetWidth.

Referenced by Network::GetGraph().

1459 {
1460  ResizeDescriptor resizeDescriptor;
1461  resizeDescriptor.m_Method = ResizeMethod::Bilinear;
1462  resizeDescriptor.m_DataLayout = descriptor.m_DataLayout;
1463  resizeDescriptor.m_TargetWidth = descriptor.m_TargetWidth;
1464  resizeDescriptor.m_TargetHeight = descriptor.m_TargetHeight;
1465 
1466  return m_Graph->AddLayer<ResizeLayer>(resizeDescriptor, name);
1467 }

◆ AddResizeLayer()

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

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.

Implements INetwork.

Definition at line 1469 of file Network.cpp.

Referenced by Network::GetGraph().

1471 {
1472  return m_Graph->AddLayer<ResizeLayer>(resizeDescriptor, name);
1473 }

◆ AddRsqrtLayer()

IConnectableLayer * AddRsqrtLayer ( const char *  name = nullptr)
overridevirtual

Add Reciprocal of square root layer to the network.

Parameters
name- Optional name for the layer. @ return - Interface for configuring the layer.

Implements INetwork.

Definition at line 1712 of file Network.cpp.

References Network::AddElementwiseUnaryLayer(), and armnn::Rsqrt.

Referenced by Network::GetGraph().

1713 {
1714  return AddElementwiseUnaryLayer(ElementwiseUnaryDescriptor(UnaryOperation::Rsqrt), name);
1715 }
IConnectableLayer * AddElementwiseUnaryLayer(const ElementwiseUnaryDescriptor &elementwiseUnaryDescriptor, const char *name=nullptr) override
Add an ElementwiseUnary layer to the network.
Definition: Network.cpp:1183

◆ AddSliceLayer()

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

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.

Implements INetwork.

Definition at line 1387 of file Network.cpp.

Referenced by Network::GetGraph().

1388 {
1389  return m_Graph->AddLayer<SliceLayer>(sliceDescriptor, name);
1390 }

◆ AddSoftmaxLayer()

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

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.

Implements INetwork.

Definition at line 1392 of file Network.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), and Network::GetGraph().

1394 {
1395  return m_Graph->AddLayer<SoftmaxLayer>(softmaxDescriptor, name);
1396 }

◆ AddSpaceToBatchNdLayer()

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

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.

Implements INetwork.

Definition at line 1508 of file Network.cpp.

Referenced by Network::GetGraph().

1510 {
1511  return m_Graph->AddLayer<SpaceToBatchNdLayer>(spaceToBatchNdDescriptor, name);
1512 }

◆ AddSpaceToDepthLayer()

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

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.

Implements INetwork.

Definition at line 1514 of file Network.cpp.

Referenced by Network::GetGraph().

1516 {
1517  return m_Graph->AddLayer<SpaceToDepthLayer>(spaceToDepthDescriptor, name);
1518 }

◆ AddSplitterLayer()

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

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.

Implements INetwork.

Definition at line 1398 of file Network.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), and Network::GetGraph().

1400 {
1401  return m_Graph->AddLayer<SplitterLayer>(splitterDescriptor, name);
1402 }

◆ AddStackLayer()

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

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.

Implements INetwork.

Definition at line 1765 of file Network.cpp.

Referenced by Network::GetGraph().

1767 {
1768  return m_Graph->AddLayer<StackLayer>(stackDescriptor, name);
1769 }

◆ AddStandInLayer()

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

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

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

Returns
- Interface for configuring the layer.

Implements INetwork.

Definition at line 1772 of file Network.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), and Network::GetGraph().

1774 {
1775  return m_Graph->AddLayer<StandInLayer>(desc, name);
1776 }

◆ AddStridedSliceLayer()

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

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.

Implements INetwork.

Definition at line 1696 of file Network.cpp.

Referenced by Network::GetGraph().

1698 {
1699  return m_Graph->AddLayer<StridedSliceLayer>(stridedSliceDescriptor, name);
1700 }

◆ AddSubtractionLayer()

IConnectableLayer * AddSubtractionLayer ( const char *  name = nullptr)
overridevirtual

Adds a subtraction layer to the network.

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

Implements INetwork.

Definition at line 1671 of file Network.cpp.

Referenced by Network::GetGraph().

1672 {
1673  return m_Graph->AddLayer<SubtractionLayer>(name);
1674 }

◆ AddSwitchLayer()

IConnectableLayer * AddSwitchLayer ( const char *  name = nullptr)
overridevirtual

Adds a switch layer to the network.

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

Implements INetwork.

Definition at line 1727 of file Network.cpp.

Referenced by Network::GetGraph().

1728 {
1729  return m_Graph->AddLayer<SwitchLayer>(name);
1730 }

◆ AddTransposeConvolution2dLayer()

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

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.

Implements INetwork.

Definition at line 1737 of file Network.cpp.

References OptionalBase::has_value(), TransposeConvolution2dDescriptor::m_BiasEnabled, TransposeConvolution2dLayer::m_Weight, and OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by Network::GetGraph().

1741 {
1742  if (descriptor.m_BiasEnabled && !biases.has_value())
1743  {
1744  throw InvalidArgumentException("AddTransposeConvolution2dLayer: Biases cannot be empty");
1745  }
1746 
1747  const auto layer = m_Graph->AddLayer<TransposeConvolution2dLayer>(descriptor, name);
1748 
1749  layer->m_Weight = std::make_unique<ScopedCpuTensorHandle>(weights);
1750 
1751  if (descriptor.m_BiasEnabled)
1752  {
1753  layer->m_Bias = std::make_unique<ScopedCpuTensorHandle>(biases.value());
1754  }
1755 
1756  return layer;
1757 }

◆ AddTransposeLayer()

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

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.

Implements INetwork.

Definition at line 1759 of file Network.cpp.

Referenced by Network::GetGraph().

1761 {
1762  return m_Graph->AddLayer<TransposeLayer>(transposeDescriptor, name);
1763 }

◆ GetGraph()

const Graph& GetGraph ( ) const
inline

Definition at line 34 of file Network.hpp.

References Network::Accept(), Network::AddAbsLayer(), Network::AddActivationLayer(), Network::AddAdditionLayer(), Network::AddArgMinMaxLayer(), Network::AddBatchNormalizationLayer(), Network::AddBatchToSpaceNdLayer(), Network::AddComparisonLayer(), Network::AddConcatLayer(), Network::AddConstantLayer(), Network::AddConvolution2dLayer(), Network::AddDepthToSpaceLayer(), Network::AddDepthwiseConvolution2dLayer(), Network::AddDequantizeLayer(), Network::AddDetectionPostProcessLayer(), Network::AddDivisionLayer(), Network::AddElementwiseUnaryLayer(), Network::AddEqualLayer(), Network::AddFloorLayer(), Network::AddFullyConnectedLayer(), Network::AddGatherLayer(), Network::AddGreaterLayer(), Network::AddInputLayer(), Network::AddInstanceNormalizationLayer(), Network::AddL2NormalizationLayer(), Network::AddLogSoftmaxLayer(), Network::AddLstmLayer(), Network::AddMaximumLayer(), Network::AddMeanLayer(), Network::AddMergeLayer(), Network::AddMergerLayer(), Network::AddMinimumLayer(), Network::AddMultiplicationLayer(), Network::AddNormalizationLayer(), Network::AddOutputLayer(), Network::AddPadLayer(), Network::AddPermuteLayer(), Network::AddPooling2dLayer(), Network::AddPreluLayer(), Network::AddQLstmLayer(), Network::AddQuantizedLstmLayer(), Network::AddQuantizeLayer(), Network::AddReshapeLayer(), Network::AddResizeBilinearLayer(), Network::AddResizeLayer(), Network::AddRsqrtLayer(), Network::AddSliceLayer(), Network::AddSoftmaxLayer(), Network::AddSpaceToBatchNdLayer(), Network::AddSpaceToDepthLayer(), Network::AddSplitterLayer(), Network::AddStackLayer(), Network::AddStandInLayer(), Network::AddStridedSliceLayer(), Network::AddSubtractionLayer(), Network::AddSwitchLayer(), Network::AddTransposeConvolution2dLayer(), Network::AddTransposeLayer(), anchors(), ARMNN_DEPRECATED_MSG, and Network::PrintGraph().

Referenced by Network::Accept(), BOOST_AUTO_TEST_CASE(), armnn::BOOST_AUTO_TEST_CASE(), armnn::GetInputTensorInfo(), and armnn::Optimize().

34 { return *m_Graph; }

◆ PrintGraph()

Status PrintGraph ( )
overridevirtual

Implements INetwork.

Definition at line 1160 of file Network.cpp.

References armnn::Success.

Referenced by BOOST_AUTO_TEST_CASE(), and Network::GetGraph().

1161 {
1162  m_Graph->Print();
1163  return Status::Success;
1164 }

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