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;
229 const char* name =
nullptr) = 0;
234 const char* name =
nullptr) = 0;
240 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;
290 const char* name =
nullptr) = 0;
300 const char* name =
nullptr) = 0;
316 const char* name =
nullptr) = 0;
332 virtual IConnectableLayer* AddMultiplicationLayer(
const char* name =
nullptr) = 0;
346 const char* name =
nullptr) = 0;
354 const char* name =
nullptr) = 0;
361 const char* name =
nullptr) = 0;
368 const char* name =
nullptr) = 0;
376 const char* name =
nullptr) = 0;
383 const char* name =
nullptr) = 0;
393 const char* name =
nullptr) = 0;
400 const char* name =
nullptr) = 0;
407 const char* name =
nullptr) = 0;
414 const char* name =
nullptr) = 0;
435 const char* name =
nullptr) = 0;
465 const char* name =
nullptr) = 0;
477 const char* name =
nullptr) = 0;
526 const char* name =
nullptr) = 0;
533 const char* name =
nullptr) = 0;
540 const char* name =
nullptr) = 0;
549 const char* name =
nullptr) = 0;
556 const char* name =
nullptr) = 0;
565 const char* name =
nullptr) = 0;
580 virtual Status PrintGraph() = 0;
581 virtual Status SerializeToDot(std::ostream& stream)
const = 0;
592 : m_ReduceFp32ToFp16(
false)
594 , m_ReduceFp32ToBf16(
false)
598 : m_ReduceFp32ToFp16(reduceFp32ToFp16)
600 , m_ReduceFp32ToBf16(reduceFp32ToBf16)
602 if (m_ReduceFp32ToFp16 && m_ReduceFp32ToBf16)
628 const std::vector<BackendId>& backendPreferences,
A ViewsDescriptor for the SplitterLayer.
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
A TransposeConvolution2dDescriptor for the TransposeConvolution2dLayer.
~IConnectableLayer()
Objects are not deletable via the handle.
A ReshapeDescriptor for the ReshapeLayer.
A ComparisonDescriptor for the ComparisonLayer.
A Convolution2dDescriptor for the Convolution2dLayer.
const TensorInfo & GetTensorInfo(const ITensorHandle *tensorHandle)
float32 helpers
Main network class which provides the interface for building up a neural network. ...
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.
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.
EmptyOptional is used to initialize the Optional class in case we want to have default value for an O...
A ElementwiseUnaryDescriptor for the ElementwiseUnaryLayer.
OptimizerOptions(bool reduceFp32ToFp16, bool debug, bool reduceFp32ToBf16=false)
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.
armnn::Runtime::CreationOptions::ExternalProfilingOptions options
A NormalizationDescriptor for the NormalizationLayer.
An InstanceNormalizationDescriptor for InstanceNormalizationLayer.
A ResizeBilinearDescriptor for the ResizeBilinearLayer.
A SoftmaxDescriptor for the SoftmaxLayer.
A DepthwiseConvolution2dDescriptor for the DepthwiseConvolution2dLayer.
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 })