21.08
|
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... | |
virtual void | Accept (ILayerVisitor &visitor) const =0 |
Apply a visitor to this layer. More... | |
virtual 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.
Implemented in QLstmLayer, QuantizedLstmLayer, PermuteLayer, TransposeLayer, ReshapeLayer, ConcatLayer, LstmLayer, UnidirectionalSequenceLstmLayer, FullyConnectedLayer, SplitterLayer, Convolution2dLayer, DepthwiseConvolution2dLayer, OutputLayer, TransposeConvolution2dLayer, BatchNormalizationLayer, ConstantLayer, StandInLayer, ComparisonLayer, DepthToSpaceLayer, LogicalBinaryLayer, PadLayer, PreluLayer, SpaceToBatchNdLayer, SpaceToDepthLayer, ArgMinMaxLayer, BatchToSpaceNdLayer, DetectionPostProcessLayer, ElementwiseUnaryLayer, Pooling2dLayer, ResizeLayer, ShapeLayer, SliceLayer, StackLayer, StridedSliceLayer, MergeLayer, PreCompiledLayer, GatherLayer, LogSoftmaxLayer, MeanLayer, AbsLayer, CastLayer, ConvertBf16ToFp32Layer, ConvertFp16ToFp32Layer, ConvertFp32ToBf16Layer, DebugLayer, DequantizeLayer, FakeQuantizationLayer, FloorLayer, InputLayer, InstanceNormalizationLayer, L2NormalizationLayer, MapLayer, MemCopyLayer, MemImportLayer, NormalizationLayer, RsqrtLayer, SoftmaxLayer, SwitchLayer, UnmapLayer, ConvertFp32ToFp16Layer, FillLayer, ReduceLayer, ActivationLayer, DivisionLayer, MaximumLayer, MinimumLayer, MultiplicationLayer, SubtractionLayer, AdditionLayer, QuantizeLayer, and RankLayer.
Referenced by armnn::TEST_SUITE().
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 >, LayerWithParameters< FakeQuantizationDescriptor >, LayerWithParameters< SoftmaxDescriptor >, LayerWithParameters< ReduceDescriptor >, LayerWithParameters< LogSoftmaxDescriptor >, LayerWithParameters< PreCompiledDescriptor >, LayerWithParameters< LstmDescriptor >, 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< L2NormalizationDescriptor >, LayerWithParameters< FillDescriptor >, LayerWithParameters< SliceDescriptor >, LayerWithParameters< DepthwiseConvolution2dDescriptor >, LayerWithParameters< QLstmDescriptor >, LayerWithParameters< NormalizationDescriptor >, LayerWithParameters< FullyConnectedDescriptor >, LayerWithParameters< StridedSliceDescriptor >, LayerWithParameters< ResizeDescriptor >, LstmLayer, UnidirectionalSequenceLstmLayer, FullyConnectedLayer, Convolution2dLayer, DepthwiseConvolution2dLayer, TransposeConvolution2dLayer, BatchNormalizationLayer, ConstantLayer, DetectionPostProcessLayer, ShapeLayer, PreCompiledLayer, FakeQuantizationLayer, MemCopyLayer, MemImportLayer, ElementwiseBaseLayer, and RankLayer.
|
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(), 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 SerializerStrategy::ExecuteStrategy(), LayerVerifierBase::ExecuteStrategy(), LayerVerifierBaseWithDescriptor< Descriptor >::ExecuteStrategy(), LayerVerifierBaseWithDescriptorAndConstants< Descriptor >::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, ConstantLayer, PermuteLayer, ReshapeLayer, PadLayer, StandInLayer, BatchToSpaceNdLayer, Pooling2dLayer, ResizeLayer, ShapeLayer, SliceLayer, StackLayer, TransposeLayer, MergeLayer, ComparisonLayer, DepthToSpaceLayer, LogicalBinaryLayer, PreluLayer, SpaceToBatchNdLayer, SpaceToDepthLayer, ArgMinMaxLayer, ElementwiseUnaryLayer, StridedSliceLayer, and ElementwiseBaseLayer.