21.11
|
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots. More...
#include <INetwork.hpp>
Public Member Functions | |
virtual const char * | GetName () const =0 |
Returns the name of the layer. More... | |
virtual unsigned int | GetNumInputSlots () const =0 |
Returns the number of connectable input slots. More... | |
virtual unsigned int | GetNumOutputSlots () const =0 |
Returns the number of connectable output slots. More... | |
virtual const IInputSlot & | GetInputSlot (unsigned int index) const =0 |
Get a const input slot handle by slot index. More... | |
virtual IInputSlot & | GetInputSlot (unsigned int index)=0 |
Get the input slot handle by slot index. More... | |
virtual const IOutputSlot & | GetOutputSlot (unsigned int index) const =0 |
Get the const output slot handle by slot index. More... | |
virtual IOutputSlot & | GetOutputSlot (unsigned int index)=0 |
Get the output slot handle by slot index. More... | |
virtual std::vector< TensorShape > | InferOutputShapes (const std::vector< TensorShape > &inputShapes) const =0 |
Infer the shape of the output(s) based on the provided input shape(s) More... | |
virtual LayerGuid | GetGuid () const =0 |
Returns the unique id of the layer. 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") virtual void Accept(ILayerVisitor &visitor) const =0 |
Apply a visitor to this layer. More... | |
virtual ARMNN_NO_DEPRECATE_WARN_END void | ExecuteStrategy (IStrategy &strategy) const =0 |
Apply a visitor to this layer. More... | |
virtual void | BackendSelectionHint (Optional< BackendId > backend)=0 |
Provide a hint for the optimizer as to which backend to prefer for this layer. More... | |
virtual LayerType | GetType () const =0 |
Returns the armnn::LayerType of this layer. More... | |
Protected Member Functions | |
~IConnectableLayer () | |
Objects are not deletable via the handle. More... | |
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition at line 61 of file INetwork.hpp.
|
inlineprotected |
|
pure virtual |
Apply a visitor to this layer.
Provide a hint for the optimizer as to which backend to prefer for this layer.
Implemented in Layer.
Referenced by TEST_SUITE().
|
pure virtual |
Apply a visitor to this layer.
Implemented in BindableLayer, Layer, QLstmLayer, QuantizedLstmLayer, LayerWithParameters< Parameters >, UnidirectionalSequenceLstmLayer, LayerWithParameters< FakeQuantizationDescriptor >, LayerWithParameters< SoftmaxDescriptor >, LayerWithParameters< ReduceDescriptor >, LayerWithParameters< LogSoftmaxDescriptor >, LayerWithParameters< PreCompiledDescriptor >, LayerWithParameters< LstmDescriptor >, LayerWithParameters< ChannelShuffleDescriptor >, LayerWithParameters< BatchToSpaceNdDescriptor >, LayerWithParameters< PermuteDescriptor >, LayerWithParameters< SpaceToBatchNdDescriptor >, LayerWithParameters< DepthToSpaceDescriptor >, LayerWithParameters< ReshapeDescriptor >, LayerWithParameters< ElementwiseUnaryDescriptor >, LayerWithParameters< GatherDescriptor >, LayerWithParameters< SpaceToDepthDescriptor >, LayerWithParameters< OriginsDescriptor >, LayerWithParameters< ViewsDescriptor >, LayerWithParameters< Pooling2dDescriptor >, LayerWithParameters< Convolution2dDescriptor >, LayerWithParameters< ActivationDescriptor >, LayerWithParameters< StandInDescriptor >, LayerWithParameters< TransposeDescriptor >, LayerWithParameters< StackDescriptor >, LayerWithParameters< MeanDescriptor >, LayerWithParameters< ComparisonDescriptor >, LayerWithParameters< InstanceNormalizationDescriptor >, LayerWithParameters< TransposeConvolution2dDescriptor >, LayerWithParameters< BatchNormalizationDescriptor >, LayerWithParameters< ArgMinMaxDescriptor >, LayerWithParameters< LogicalBinaryDescriptor >, LayerWithParameters< DetectionPostProcessDescriptor >, LayerWithParameters< PadDescriptor >, LayerWithParameters< Convolution3dDescriptor >, LayerWithParameters< L2NormalizationDescriptor >, LayerWithParameters< FillDescriptor >, LayerWithParameters< SliceDescriptor >, LayerWithParameters< DepthwiseConvolution2dDescriptor >, LayerWithParameters< QLstmDescriptor >, LayerWithParameters< NormalizationDescriptor >, LayerWithParameters< FullyConnectedDescriptor >, LayerWithParameters< StridedSliceDescriptor >, LayerWithParameters< ResizeDescriptor >, LstmLayer, FullyConnectedLayer, Convolution2dLayer, DepthwiseConvolution2dLayer, TransposeConvolution2dLayer, BatchNormalizationLayer, ConstantLayer, Convolution3dLayer, ShapeLayer, DetectionPostProcessLayer, PreCompiledLayer, FakeQuantizationLayer, MemCopyLayer, MemImportLayer, ElementwiseBaseLayer, and RankLayer.
Referenced by armnn::TEST_SUITE().
|
pure virtual |
Returns the unique id of the layer.
Implemented in Layer.
Referenced by armnnSerializer::GetFlatBufferArgMinMaxFunction(), RangeTracker::SetRange(), TEST_SUITE(), and VerifyPostOptimisationStructureTestImpl().
|
pure virtual |
Get a const input slot handle by slot index.
Implemented in Layer.
Referenced by armnnTfLiteParser::ComputeWrappedIndex(), Connect(), OnnxParserImpl::CreateNetworkFromString(), CreateTestNetwork(), IDeserializer::DeserializerImpl::GetNetworkOutputBindingInfo(), TfLiteParserImpl::GetOutputTensorIds(), GetSoftmaxProfilerJson(), SerializerStrategy::GetVersionTable(), TfLiteParserImpl::OutputShapeOfReshape(), TfLiteParserImpl::OutputShapeOfSqueeze(), TEST_SUITE(), armnn::TEST_SUITE(), LayerVerifierBase::VerifyNameAndConnections(), and VerifyPostOptimisationStructureTestImpl().
|
pure virtual |
Get the input slot handle by slot index.
Implemented in Layer.
|
pure virtual |
Returns the name of the layer.
Implemented in Layer.
Referenced by armnnTfLiteParser::ComputeWrappedIndex(), Connect(), SerializerStrategy::ExecuteStrategy(), armnnSerializer::GetFlatBufferArgMinMaxFunction(), TfLiteParserImpl::OutputShapeOfReshape(), and TEST_SUITE().
|
pure virtual |
Returns the number of connectable input slots.
Implemented in Layer.
Referenced by OnnxParserImpl::CreateNetworkFromString(), IDeserializer::DeserializerImpl::GetNetworkOutputBindingInfo(), TfLiteParserImpl::GetOutputTensorIds(), SerializerStrategy::GetVersionTable(), TEST_SUITE(), and LayerVerifierBase::VerifyNameAndConnections().
|
pure virtual |
Returns the number of connectable output slots.
Implemented in Layer.
Referenced by armnnTfLiteParser::ComputeWrappedIndex(), OnnxParserImpl::CreateNetworkFromString(), IDeserializer::DeserializerImpl::GetNetworkOutputBindingInfo(), TfLiteParserImpl::GetOutputTensorIds(), SerializerStrategy::GetVersionTable(), TfLiteParserImpl::OutputShapeOfReshape(), RangeTracker::SetRange(), TEST_SUITE(), and LayerVerifierBase::VerifyNameAndConnections().
|
pure virtual |
Get the const output slot handle by slot index.
Implemented in Layer.
Referenced by armnnTfLiteParser::ComputeWrappedIndex(), Connect(), OnnxParserImpl::CreateNetworkFromString(), IDeserializer::DeserializerImpl::GetLstmDescriptor(), IDeserializer::DeserializerImpl::GetNetworkOutputBindingInfo(), IDeserializer::DeserializerImpl::GetNormalizationDescriptor(), armnnDeserializer::GetOriginsDescriptor(), TfLiteParserImpl::GetOutputTensorIds(), IDeserializer::DeserializerImpl::GetPoolingDescriptor(), IDeserializer::DeserializerImpl::GetQLstmDescriptor(), GetSoftmaxProfilerJson(), IDeserializer::DeserializerImpl::GetUnidirectionalSequenceLstmDescriptor(), SerializerStrategy::GetVersionTable(), TfLiteParserImpl::LoadModel(), IDeserializer::DeserializerImpl::OutputShapeOfReshape(), TfLiteParserImpl::OutputShapeOfReshape(), TfLiteParserImpl::OutputShapeOfSqueeze(), TEST_SUITE(), armnn::TEST_SUITE(), LayerVerifierBase::VerifyNameAndConnections(), and VerifyPostOptimisationStructureTestImpl().
|
pure virtual |
Get the output slot handle by slot index.
Implemented in Layer.
|
pure virtual |
Returns the armnn::LayerType of this layer.
Implemented in Layer.
Referenced by Connect(), SerializerStrategy::ExecuteStrategy(), TestInputLayerVisitor::ExecuteStrategy(), LayerVerifierBase::ExecuteStrategy(), StrategyBase< NoThrowStrategy >::ExecuteStrategy(), TestConvolution2dLayerVisitor::ExecuteStrategy(), LayerVerifierBaseWithDescriptor< Descriptor >::ExecuteStrategy(), TestOutputLayerVisitor::ExecuteStrategy(), TestDepthwiseConvolution2dLayerVisitor::ExecuteStrategy(), LayerVerifierBaseWithDescriptorAndConstants< Descriptor >::ExecuteStrategy(), TestFullyConnectedLayerVistor::ExecuteStrategy(), TestBatchNormalizationLayerVisitor::ExecuteStrategy(), TestConstantLayerVisitor::ExecuteStrategy(), TestLstmLayerVisitor::ExecuteStrategy(), TestQLstmLayerVisitor::ExecuteStrategy(), TestQuantizedLstmLayerVisitor::ExecuteStrategy(), and TEST_SUITE().
|
pure virtual |
Infer the shape of the output(s) based on the provided input shape(s)
Implemented in Layer, QLstmLayer, QuantizedLstmLayer, ConcatLayer, LstmLayer, UnidirectionalSequenceLstmLayer, FullyConnectedLayer, SplitterLayer, Convolution2dLayer, DepthwiseConvolution2dLayer, TransposeConvolution2dLayer, Convolution3dLayer, ConstantLayer, PermuteLayer, ReshapeLayer, PadLayer, StandInLayer, BatchToSpaceNdLayer, Pooling2dLayer, ResizeLayer, ShapeLayer, SliceLayer, StackLayer, TransposeLayer, MergeLayer, ComparisonLayer, DepthToSpaceLayer, LogicalBinaryLayer, PreluLayer, SpaceToBatchNdLayer, SpaceToDepthLayer, ArgMinMaxLayer, ElementwiseUnaryLayer, GatherLayer, StridedSliceLayer, and ElementwiseBaseLayer.