20.02
|
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 | BackendSelectionHint (Optional< BackendId > backend)=0 |
Provide a hint for the optimizer as to which backend to prefer for 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 LstmLayer, QuantizedLstmLayer, PermuteLayer, TransposeLayer, SplitterLayer, ConcatLayer, ReshapeLayer, Convolution2dLayer, DepthwiseConvolution2dLayer, FullyConnectedLayer, OutputLayer, TransposeConvolution2dLayer, BatchNormalizationLayer, ConstantLayer, StandInLayer, ComparisonLayer, DepthToSpaceLayer, PreluLayer, SpaceToBatchNdLayer, SpaceToDepthLayer, ArgMinMaxLayer, BatchToSpaceNdLayer, DetectionPostProcessLayer, ElementwiseUnaryLayer, Pooling2dLayer, PreCompiledLayer, ResizeLayer, SliceLayer, StackLayer, StridedSliceLayer, MergeLayer, ConvertFp16ToFp32Layer, GatherLayer, LogSoftmaxLayer, MeanLayer, PadLayer, AbsLayer, ConvertFp32ToFp16Layer, DebugLayer, DequantizeLayer, FakeQuantizationLayer, FloorLayer, InputLayer, InstanceNormalizationLayer, L2NormalizationLayer, MemCopyLayer, MemImportLayer, NormalizationLayer, RsqrtLayer, SoftmaxLayer, SwitchLayer, ActivationLayer, DivisionLayer, MaximumLayer, MinimumLayer, MultiplicationLayer, SubtractionLayer, AdditionLayer, and QuantizeLayer.
Referenced by armnn::BOOST_AUTO_TEST_CASE().
Provide a hint for the optimizer as to which backend to prefer for this layer.
Implemented in Layer.
|
pure virtual |
Returns the unique id of the layer.
Implemented in Layer.
Referenced by BOOST_AUTO_TEST_CASE(), armnn::BOOST_AUTO_TEST_CASE(), QuantizerVisitor::QuantizerVisitor(), RangeTracker::SetRange(), VerifyPostOptimisationStructureTestImpl(), and SerializerVisitor::VisitQuantizedLstmLayer().
|
pure virtual |
Get a const input slot handle by slot index.
Implemented in Layer.
Referenced by CaffeParserBase::AddConvLayerWithSplits(), BOOST_AUTO_TEST_CASE(), armnn::BOOST_AUTO_TEST_CASE(), armnnTfParser::CalculatePaddedOutputTensorInfo(), armnn::CompleteLeakyReluNetwork(), Connect(), armnnTfParser::ConvertTfTensorDataType(), OnnxParser::CreateNetworkFromString(), armnn::CreateNetworkWithActivationLayer(), armnn::CreateNetworkWithFullyConnectedLayer(), armnn::CreateNetworkWithInputOutputLayers(), armnn::CreateNetworkWithSoftmaxLayer(), armnn::CreateStartOfLeakyReluNetwork(), DynamicQuantizationVisitor::DynamicQuantizationVisitor(), Deserializer::GetNetworkOutputBindingInfo(), TfLiteParser::GetOutputTensorIds(), GetSoftmaxProfilerJson(), SerializerVisitor::GetVersionTable(), armnnTfParser::OutputShapeOfExpandDims(), TfLiteParser::OutputShapeOfReshape(), armnnTfParser::OutputShapeOfSqueeze(), CaffeParserBase::ParseBatchNormLayer(), CaffeParserBase::ParseConcatLayer(), CaffeParserBase::ParseEltwiseLayer(), CaffeParserBase::ParseInnerProductLayer(), CaffeParserBase::ParseLRNLayer(), CaffeParserBase::ParsePoolingLayer(), CaffeParserBase::ParseReluLayer(), CaffeParserBase::ParseScaleLayer(), CaffeParserBase::ParseSoftmaxLayer(), armnn::PreserveTypeTestImpl(), QuantizerVisitor::QuantizerVisitor(), StaticRangeVisitor::StaticRangeVisitor(), armnn::TestQuantizeConvolution2d(), armnn::TestQuantizeDepthwiseConvolution2d(), armnn::TestQuantizeTransposeConvolution2d(), TfLiteParser::TfLiteParser(), TfParser::TfParser(), VerifyPostOptimisationStructureTestImpl(), DynamicQuantizationVisitor::VisitConcatLayer(), StaticRangeVisitor::VisitConcatLayer(), QuantizerVisitor::VisitInputLayer(), and QuantizerVisitor::VisitOutputLayer().
|
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 BOOST_AUTO_TEST_CASE(), armnn::BOOST_AUTO_TEST_CASE(), TfParser::GetNetworkOutputBindingInfo(), IWorkloadFactory::IsLayerSupported(), TfLiteParser::OutputShapeOfReshape(), TfLiteParser::TfLiteParser(), CaffeParserBase::TrackBindingPoint(), CaffeParserBase::TrackInputBinding(), CaffeParserBase::TrackOutputBinding(), and SerializerVisitor::VisitQuantizedLstmLayer().
|
pure virtual |
Returns the number of connectable input slots.
Implemented in Layer.
Referenced by BOOST_AUTO_TEST_CASE(), OnnxParser::CreateNetworkFromString(), DynamicQuantizationVisitor::DynamicQuantizationVisitor(), Deserializer::GetNetworkOutputBindingInfo(), TfLiteParser::GetOutputTensorIds(), SerializerVisitor::GetVersionTable(), QuantizerVisitor::QuantizerVisitor(), DynamicQuantizationVisitor::VisitConcatLayer(), and StaticRangeVisitor::VisitConcatLayer().
|
pure virtual |
Returns the number of connectable output slots.
Implemented in Layer.
Referenced by CaffeParserBase::AddConvLayerWithSplits(), BOOST_AUTO_TEST_CASE(), OnnxParser::CreateNetworkFromString(), Deserializer::GetNetworkOutputBindingInfo(), TfLiteParser::GetOutputTensorIds(), SerializerVisitor::GetVersionTable(), TfLiteParser::OutputShapeOfReshape(), armnnTfParser::OutputShapeOfSqueeze(), and RangeTracker::SetRange().
|
pure virtual |
Get the const output slot handle by slot index.
Implemented in Layer.
Referenced by CaffeParserBase::AddConvLayerWithSplits(), BOOST_AUTO_TEST_CASE(), armnn::BOOST_AUTO_TEST_CASE(), armnnTfParser::CalculatePaddedOutputTensorInfo(), armnn::CompleteLeakyReluNetwork(), Connect(), armnnTfParser::ConvertTfTensorDataType(), TfLiteParser::CreateNetworkFromBinary(), OnnxParser::CreateNetworkFromString(), armnn::CreateNetworkWithActivationLayer(), armnn::CreateNetworkWithFullyConnectedLayer(), armnn::CreateNetworkWithInputOutputLayers(), armnn::CreateNetworkWithSoftmaxLayer(), armnn::CreateStartOfLeakyReluNetwork(), Deserializer::GetLstmDescriptor(), Deserializer::GetNetworkOutputBindingInfo(), Deserializer::GetNormalizationDescriptor(), armnnDeserializer::GetOriginsDescriptor(), TfLiteParser::GetOutputTensorIds(), Deserializer::GetPoolingDescriptor(), GetSoftmaxProfilerJson(), SerializerVisitor::GetVersionTable(), armnnTfParser::OutputShapeOfExpandDims(), Deserializer::OutputShapeOfReshape(), TfLiteParser::OutputShapeOfReshape(), TfLiteParser::OutputShapeOfSqueeze(), armnnTfParser::OutputShapeOfSqueeze(), CaffeParserBase::ParseBatchNormLayer(), CaffeParserBase::ParseConcatLayer(), CaffeParserBase::ParseEltwiseLayer(), CaffeParserBase::ParseInnerProductLayer(), CaffeParserBase::ParseLRNLayer(), CaffeParserBase::ParsePoolingLayer(), CaffeParserBase::ParseReluLayer(), CaffeParserBase::ParseScaleLayer(), CaffeParserBase::ParseSoftmaxLayer(), armnn::PreserveTypeTestImpl(), QuantizerVisitor::QuantizerVisitor(), armnn::TestQuantizeConvolution2d(), armnn::TestQuantizeDepthwiseConvolution2d(), armnn::TestQuantizeTransposeConvolution2d(), TfLiteParser::TfLiteParser(), TfParser::TfParser(), VerifyPostOptimisationStructureTestImpl(), InputLayerVisitor::VisitInputLayer(), QuantizerVisitor::VisitInputLayer(), armnn::VisitLayersTopologically(), and QuantizerVisitor::VisitOutputLayer().
|
pure virtual |
Get the output slot handle by slot index.
Implemented in Layer.
|
pure virtual |
Infer the shape of the output(s) based on the provided input shape(s)
Implemented in Layer, LstmLayer, QuantizedLstmLayer, SplitterLayer, ConcatLayer, Convolution2dLayer, DepthwiseConvolution2dLayer, FullyConnectedLayer, TransposeConvolution2dLayer, ConstantLayer, StandInLayer, BatchToSpaceNdLayer, PermuteLayer, Pooling2dLayer, ReshapeLayer, ResizeLayer, SliceLayer, StackLayer, MergeLayer, TransposeLayer, ComparisonLayer, DepthToSpaceLayer, PreluLayer, SpaceToBatchNdLayer, SpaceToDepthLayer, ArgMinMaxLayer, ElementwiseUnaryLayer, StridedSliceLayer, and ElementwiseBaseLayer.