40 virtual unsigned int GetNumConnections()
const = 0;
44 virtual void SetTensorInfo(
const TensorInfo& tensorInfo) = 0;
46 virtual bool IsTensorInfoSet()
const = 0;
51 virtual unsigned int CalculateIndexOnOwner()
const = 0;
53 virtual LayerGuid GetOwningLayerGuid()
const = 0;
65 virtual const char* GetName()
const = 0;
68 virtual unsigned int GetNumInputSlots()
const = 0;
71 virtual unsigned int GetNumOutputSlots()
const = 0;
74 virtual const IInputSlot& GetInputSlot(
unsigned int index)
const = 0;
77 virtual IInputSlot& GetInputSlot(
unsigned int index) = 0;
80 virtual const IOutputSlot& GetOutputSlot(
unsigned int index)
const = 0;
83 virtual IOutputSlot& GetOutputSlot(
unsigned int index) = 0;
86 virtual std::vector<TensorShape> InferOutputShapes(
const std::vector<TensorShape>& inputShapes)
const = 0;
101 using INetworkPtr = std::unique_ptr<INetwork, void(*)(INetwork* network)>;
110 static void Destroy(
INetwork* network);
112 virtual Status PrintGraph() = 0;
126 const char* name =
nullptr) = 0;
133 const char* name =
nullptr) = 0;
143 const char* name =
nullptr) = 0;
154 const char* name =
nullptr) = 0;
159 const char* name =
nullptr) = 0;
165 const char* name =
nullptr) = 0;
172 const char* name =
nullptr) = 0;
184 const char* name =
nullptr) = 0;
190 const char* name =
nullptr) = 0;
197 const char* name =
nullptr) = 0;
211 const char* name =
nullptr) = 0;
218 const char* name =
nullptr) = 0;
225 const char* name =
nullptr) = 0;
236 const char* name =
nullptr) = 0;
241 const char* name =
nullptr) = 0;
247 const char* name =
nullptr) = 0;
254 const char* name =
nullptr) = 0;
261 const char* name =
nullptr) = 0;
268 const char* name =
nullptr) = 0;
275 const char* name =
nullptr) = 0;
282 const char* name =
nullptr) = 0;
297 const char* name =
nullptr) = 0;
307 const char* name =
nullptr) = 0;
323 const char* name =
nullptr) = 0;
339 virtual IConnectableLayer* AddMultiplicationLayer(
const char* name =
nullptr) = 0;
353 const char* name =
nullptr) = 0;
366 const char* name =
nullptr) = 0;
373 const char* name =
nullptr) = 0;
380 const char* name =
nullptr) = 0;
388 const char* name =
nullptr) = 0;
395 const char* name =
nullptr) = 0;
405 const char* name =
nullptr) = 0;
412 const char* name =
nullptr) = 0;
419 const char* name =
nullptr) = 0;
426 const char* name =
nullptr) = 0;
447 const char* name =
nullptr) = 0;
477 const char* name =
nullptr) = 0;
489 const char* name =
nullptr) = 0;
525 const char* name =
nullptr) = 0;
546 const char* name =
nullptr) = 0;
553 const char* name =
nullptr) = 0;
560 const char* name =
nullptr) = 0;
569 const char* name =
nullptr) = 0;
576 const char* name =
nullptr) = 0;
585 const char* name =
nullptr) = 0;
592 const char* name =
nullptr) = 0;
607 virtual Status PrintGraph() = 0;
608 virtual Status SerializeToDot(std::ostream& stream)
const = 0;
619 : m_ReduceFp32ToFp16(
false)
621 , m_ReduceFp32ToBf16(
false)
623 , m_ImportEnabled(
false)
629 : m_ReduceFp32ToFp16(reduceFp32ToFp16)
631 , m_ReduceFp32ToBf16(reduceFp32ToBf16)
633 , m_ImportEnabled(importEnabled)
634 , m_ModelOptions(modelOptions)
636 if (m_ReduceFp32ToFp16 && m_ReduceFp32ToBf16)
644 bool importEnabled =
false,
ModelOptions modelOptions = {})
645 : m_ReduceFp32ToFp16(reduceFp32ToFp16)
647 , m_ReduceFp32ToBf16(reduceFp32ToBf16)
648 , m_shapeInferenceMethod(shapeInferenceMethod)
649 , m_ImportEnabled(importEnabled)
650 , m_ModelOptions(modelOptions)
652 if (m_ReduceFp32ToFp16 && m_ReduceFp32ToBf16)
687 const std::vector<BackendId>& backendPreferences,
ModelOptions m_ModelOptions
A ViewsDescriptor for the SplitterLayer.
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
ShapeInferenceMethod m_shapeInferenceMethod
A TransposeConvolution2dDescriptor for the TransposeConvolution2dLayer.
~IConnectableLayer()
Objects are not deletable via the handle.
A ReshapeDescriptor for the ReshapeLayer.
A ComparisonDescriptor for the ComparisonLayer.
std::vector< BackendOptions > ModelOptions
A Convolution2dDescriptor for the Convolution2dLayer.
Main network class which provides the interface for building up a neural network. ...
std::vector< BackendOptions > NetworkOptions
A LogicalBinaryDescriptor for the LogicalBinaryLayer.
Copyright (c) 2020 ARM Limited.
A SpaceToDepthDescriptor for the SpaceToDepthLayer.
A BatchToSpaceNdDescriptor for the BatchToSpaceNdLayer.
int LayerBindingId
Type of identifiers for bindable layers (inputs, outputs).
A ResizeDescriptor for the ResizeLayer.
A StackDescriptor for the StackLayer.
A PadDescriptor for the PadLayer.
An LstmDescriptor for the LstmLayer.
IOptimizedNetworkPtr Optimize(const INetwork &network, const std::vector< BackendId > &backendPreferences, const IDeviceSpec &deviceSpec, const OptimizerOptions &options=OptimizerOptions(), Optional< std::vector< std::string > &> messages=EmptyOptional())
Create an optimized version of the network.
An output connection slot for a layer.
A L2NormalizationDescriptor for the L2NormalizationLayer.
An ArgMinMaxDescriptor for ArgMinMaxLayer.
An OriginsDescriptor for the ConcatLayer.
A FullyConnectedDescriptor for the FullyConnectedLayer.
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
Validate all output shapes.
A GatherDescriptor for the GatherLayer.
std::unique_ptr< IOptimizedNetwork, void(*)(IOptimizedNetwork *network)> IOptimizedNetworkPtr
A StandInDescriptor for the StandIn layer.
A QLstmDescriptor for the QLstmLayer.
Device specific knowledge to be passed to the optimizer.
An ActivationDescriptor for the ActivationLayer.
A SliceDescriptor for the SliceLayer.
A SpaceToBatchNdDescriptor for the SpaceToBatchNdLayer.
OptimizerOptions(bool reduceFp32ToFp16, bool debug, bool reduceFp32ToBf16, bool importEnabled, ModelOptions modelOptions={})
EmptyOptional is used to initialize the Optional class in case we want to have default value for an O...
A ElementwiseUnaryDescriptor for the ElementwiseUnaryLayer.
A MeanDescriptor for the MeanLayer.
A TransposeDescriptor for the TransposeLayer.
A StridedSliceDescriptor for the StridedSliceLayer.
void Connect(armnn::IConnectableLayer *from, armnn::IConnectableLayer *to, const armnn::TensorInfo &tensorInfo, unsigned int fromIndex, unsigned int toIndex)
#define ARMNN_DEPRECATED_MSG(message)
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
~IOutputSlot()
Not user deletable.
A Pooling2dDescriptor for the Pooling2dLayer.
A NormalizationDescriptor for the NormalizationLayer.
An InstanceNormalizationDescriptor for InstanceNormalizationLayer.
const TensorInfo & GetTensorInfo(const ITensorHandle *tensorHandle)
float32 helpers
A ResizeBilinearDescriptor for the ResizeBilinearLayer.
A SoftmaxDescriptor for the SoftmaxLayer.
ShapeInferenceMethod
The ShapeInferenceMethod modify how the output shapes are treated.
A DepthwiseConvolution2dDescriptor for the DepthwiseConvolution2dLayer.
OptimizerOptions(bool reduceFp32ToFp16, bool debug, bool reduceFp32ToBf16=false, ShapeInferenceMethod shapeInferenceMethod=armnn::ShapeInferenceMethod::ValidateOnly, bool importEnabled=false, ModelOptions modelOptions={})
A FillDescriptor for the FillLayer.
A BatchNormalizationDescriptor for the BatchNormalizationLayer.
A PermuteDescriptor for the PermuteLayer.
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 })