ArmNN
NotReleased
|
#include <Layer.hpp>
Public Member Functions | |
Layer (unsigned int numInputSlots, unsigned int numOutputSlots, LayerType type, const char *name) | |
Layer (unsigned int numInputSlots, unsigned int numOutputSlots, LayerType type, DataLayout layout, const char *name) | |
const std::string & | GetNameStr () const |
const OutputHandler & | GetOutputHandler (unsigned int i=0) const |
OutputHandler & | GetOutputHandler (unsigned int i=0) |
const std::vector< InputSlot > & | GetInputSlots () const |
const std::vector< OutputSlot > & | GetOutputSlots () const |
std::vector< InputSlot >::iterator | BeginInputSlots () |
std::vector< InputSlot >::iterator | EndInputSlots () |
std::vector< OutputSlot >::iterator | BeginOutputSlots () |
std::vector< OutputSlot >::iterator | EndOutputSlots () |
bool | IsOutputUnconnected () |
void | ResetPriority () const |
LayerPriority | GetPriority () const |
LayerType | GetType () const |
DataType | GetDataType () const |
const BackendId & | GetBackendId () const |
void | SetBackendId (const BackendId &id) |
virtual std::unique_ptr< IWorkload > | CreateWorkload (const IWorkloadFactory &factory) const =0 |
virtual void | CreateTensorHandles (const TensorHandleFactoryRegistry ®istry, const IWorkloadFactory &factory, const bool IsMemoryManaged=true) |
virtual Layer * | Clone (Graph &graph) const =0 |
void | VerifyLayerConnections (unsigned int expectedConnections, const CheckLocation &location) const |
virtual void | ValidateTensorShapesFromInputs ()=0 |
std::vector< TensorShape > | InferOutputShapes (const std::vector< TensorShape > &inputShapes) const override |
virtual void | SerializeLayerParameters (ParameterStringifyFunction &fn) const |
virtual void | ReleaseConstantData () |
template<typename Op > | |
void | OperateOnConstantTensors (Op op) |
const char * | GetName () const override |
unsigned int | GetNumInputSlots () const override |
unsigned int | GetNumOutputSlots () const override |
const InputSlot & | GetInputSlot (unsigned int index) const override |
InputSlot & | GetInputSlot (unsigned int index) override |
const OutputSlot & | GetOutputSlot (unsigned int index=0) const override |
OutputSlot & | GetOutputSlot (unsigned int index=0) override |
void | SetGuid (LayerGuid guid) |
LayerGuid | GetGuid () const final |
void | AddRelatedLayerName (const std::string layerName) |
const std::list< std::string > & | GetRelatedLayerNames () |
virtual void | Reparent (Graph &dest, std::list< Layer *>::const_iterator iterator)=0 |
Public Member Functions inherited from IConnectableLayer | |
virtual void | Accept (ILayerVisitor &visitor) const =0 |
Protected Types | |
using | ConstantTensors = std::vector< std::reference_wrapper< std::unique_ptr< ScopedCpuTensorHandle > >> |
Protected Member Functions | |
virtual | ~Layer ()=default |
template<typename QueueDescriptor > | |
void | CollectQueueDescriptorInputs (QueueDescriptor &descriptor, WorkloadInfo &info) const |
template<typename QueueDescriptor > | |
void | CollectQueueDescriptorOutputs (QueueDescriptor &descriptor, WorkloadInfo &info) const |
template<typename QueueDescriptor > | |
WorkloadInfo | PrepInfoAndDesc (QueueDescriptor &descriptor) const |
Helper function to reduce duplication in *LayerCreateWorkload. More... | |
template<typename LayerType , typename ... Params> | |
LayerType * | CloneBase (Graph &graph, Params &&... params) const |
virtual ConstantTensors | GetConstantTensorsByRef () |
Protected Member Functions inherited from IConnectableLayer | |
~IConnectableLayer () | |
Objects are not deletable via the handle. More... | |
Protected Attributes | |
std::vector< OutputHandler > | m_OutputHandlers |
Friends | |
class | Graph |
|
protected |
Layer | ( | unsigned int | numInputSlots, |
unsigned int | numOutputSlots, | ||
LayerType | type, | ||
const char * | name | ||
) |
name | - Optional name for the layer (may be nullptr). |
Definition at line 212 of file Layer.cpp.
References Layer::GetInputSlots(), Layer::m_OutputHandlers, and WorkloadDataCollector::Push().
Layer | ( | unsigned int | numInputSlots, |
unsigned int | numOutputSlots, | ||
LayerType | type, | ||
DataLayout | layout, | ||
const char * | name | ||
) |
Definition at line 187 of file Layer.cpp.
References Layer::m_OutputHandlers.
|
protectedvirtualdefault |
|
inline |
|
inline |
Definition at line 235 of file Layer.hpp.
Referenced by armnn::InsertConvertFp16ToFp32LayersBefore(), ConvertFp32NetworkToFp16Impl::Run(), and MovePermuteUpImpl::Run().
|
inline |
Definition at line 239 of file Layer.hpp.
Referenced by Graph::Graph(), armnn::InsertDebugLayerAfter(), ConvertFp32NetworkToFp16Impl::Run(), and SquashEqualSiblingsImpl< Comparable >::Run().
Creates a dynamically-allocated copy of this layer.
Implemented in LstmLayer, QuantizedLstmLayer, OutputLayer, BatchNormalizationLayer, SplitterLayer, ConcatLayer, Convolution2dLayer, DepthwiseConvolution2dLayer, FullyConnectedLayer, TransposeConvolution2dLayer, DetectionPostProcessLayer, PreCompiledLayer, ConstantLayer, ArgMinMaxLayer, ComparisonLayer, ConvertFp16ToFp32Layer, DepthToSpaceLayer, DivisionLayer, ElementwiseUnaryLayer, GatherLayer, LogSoftmaxLayer, MaximumLayer, MeanLayer, MinimumLayer, MultiplicationLayer, PadLayer, PreluLayer, SpaceToBatchNdLayer, SpaceToDepthLayer, StandInLayer, SubtractionLayer, AbsLayer, AdditionLayer, BatchToSpaceNdLayer, ConvertFp32ToFp16Layer, DebugLayer, DequantizeLayer, FakeQuantizationLayer, FloorLayer, InputLayer, InstanceNormalizationLayer, L2NormalizationLayer, MemCopyLayer, MemImportLayer, MergeLayer, NormalizationLayer, PermuteLayer, Pooling2dLayer, ReshapeLayer, ResizeLayer, RsqrtLayer, SliceLayer, SoftmaxLayer, StackLayer, StridedSliceLayer, SwitchLayer, ActivationLayer, and QuantizeLayer.
Referenced by Graph::Graph().
Definition at line 14 of file LayerCloneBase.hpp.
References Graph::AddLayer(), Layer::GetBackendId(), and Layer::GetGuid().
|
inlineprotected |
Definition at line 329 of file Layer.hpp.
References QueueDescriptor::m_Inputs, and WorkloadInfo::m_InputTensorInfos.
|
inlineprotected |
Definition at line 336 of file Layer.hpp.
References QueueDescriptor::m_Outputs, and WorkloadInfo::m_OutputTensorInfos.
|
virtual |
Reimplemented in SplitterLayer, ConcatLayer, and OutputLayer.
Definition at line 239 of file Layer.cpp.
References OutputHandler::CreateTensorHandles(), TensorHandleFactoryRegistry::GetFactory(), Layer::GetNumOutputSlots(), Layer::GetOutputHandler(), Layer::GetOutputSlot(), OutputSlot::GetTensorHandleFactoryId(), and ITensorHandleFactory::LegacyFactoryId.
|
pure virtual |
Implemented in LstmLayer, QuantizedLstmLayer, BatchNormalizationLayer, Convolution2dLayer, PreCompiledLayer, DepthwiseConvolution2dLayer, FullyConnectedLayer, TransposeConvolution2dLayer, DetectionPostProcessLayer, ConstantLayer, ArgMinMaxLayer, ComparisonLayer, ConvertFp16ToFp32Layer, DepthToSpaceLayer, DivisionLayer, ElementwiseUnaryLayer, GatherLayer, LogSoftmaxLayer, MaximumLayer, MeanLayer, MinimumLayer, MultiplicationLayer, PadLayer, PreluLayer, SpaceToBatchNdLayer, SpaceToDepthLayer, StandInLayer, SubtractionLayer, AbsLayer, AdditionLayer, BatchToSpaceNdLayer, ConcatLayer, ConvertFp32ToFp16Layer, DebugLayer, DequantizeLayer, FakeQuantizationLayer, FloorLayer, InputLayer, InstanceNormalizationLayer, L2NormalizationLayer, MemCopyLayer, MemImportLayer, MergeLayer, NormalizationLayer, OutputLayer, PermuteLayer, Pooling2dLayer, QuantizeLayer, ReshapeLayer, ResizeLayer, RsqrtLayer, SliceLayer, SoftmaxLayer, SplitterLayer, StackLayer, StridedSliceLayer, SwitchLayer, and ActivationLayer.
|
inline |
Definition at line 236 of file Layer.hpp.
Referenced by armnn::InsertConvertFp16ToFp32LayersBefore(), ConvertFp32NetworkToFp16Impl::Run(), and MovePermuteUpImpl::Run().
|
inline |
Definition at line 240 of file Layer.hpp.
Referenced by armnn::InsertDebugLayerAfter(), and ConvertFp32NetworkToFp16Impl::Run().
|
inline |
Definition at line 263 of file Layer.hpp.
Referenced by Graph::AddCompatibilityLayers(), armnn::ApplyBackendOptimizations(), BOOST_AUTO_TEST_CASE(), armnn::CalculateEdgeStrategy(), armnn::CalculateSlotOption(), armnn::CalculateSlotOptionForInput(), Layer::CloneBase(), LoadedNetwork::GetOutputTensorInfo(), and armnn::SelectTensorHandleStrategy().
|
inlineprotectedvirtual |
Reimplemented in LstmLayer, QuantizedLstmLayer, Convolution2dLayer, DepthwiseConvolution2dLayer, FullyConnectedLayer, TransposeConvolution2dLayer, BatchNormalizationLayer, ConstantLayer, and DetectionPostProcessLayer.
Definition at line 357 of file Layer.hpp.
DataType GetDataType | ( | ) | const |
Definition at line 272 of file Layer.cpp.
References InputSlot::GetConnection(), TensorInfo::GetDataType(), Layer::GetInputSlot(), Layer::GetNumInputSlots(), Layer::GetOutputSlot(), IOutputSlot::GetTensorInfo(), and OutputSlot::GetTensorInfo().
Referenced by BOOST_AUTO_TEST_CASE(), ConvertFp32NetworkToFp16Impl::Run(), IsFloat32Layer::Test(), and IsFloat16Layer::Test().
|
inlinefinalvirtual |
Implements IConnectableLayer.
Definition at line 316 of file Layer.hpp.
Referenced by Layer::CloneBase(), DebugLayer::CreateWorkload(), OutputSlot::GetOwningLayerGuid(), QuantizerVisitor::QuantizerVisitor(), and Graph::SerializeToDot().
|
inlineoverridevirtual |
Implements IConnectableLayer.
Definition at line 310 of file Layer.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), CreateConvolution2dGraph(), CreateDepthwiseConvolution2dGraph(), CreateGatherGraph(), CreatePooling2dGraph(), CreateResizeBilinearGraph(), ConcatLayer::CreateWorkload(), DebugLayer::CreateWorkload(), Layer::GetDataType(), Graph::Graph(), InputSlot::Insert(), armnn::InsertConvertFp16ToFp32LayersBefore(), armnn::InsertConvertFp32ToFp16LayersAfter(), armnn::InsertDebugLayerAfter(), IWorkloadFactory::IsLayerSupported(), PermuteAsReshapeImpl::Run(), FoldPadIntoConvolution2dImpl::Run(), OptimizeConsecutiveReshapesImpl::Run(), PermuteAndBatchToSpaceAsDepthToSpaceImpl::Run(), OptimizeInverseConversionsImpl::Run(), OptimizeInversePermutesImpl::Run(), MovePermuteUpImpl::Run(), DepthwiseConvolution2dLayer::SerializeLayerParameters(), Convolution2dLayer::SerializeLayerParameters(), ElementwiseBaseLayer::ValidateTensorShapesFromInputs(), QuantizeLayer::ValidateTensorShapesFromInputs(), ActivationLayer::ValidateTensorShapesFromInputs(), SliceLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToFp16Layer::ValidateTensorShapesFromInputs(), BatchToSpaceNdLayer::ValidateTensorShapesFromInputs(), MemImportLayer::ValidateTensorShapesFromInputs(), MemCopyLayer::ValidateTensorShapesFromInputs(), DebugLayer::ValidateTensorShapesFromInputs(), MergeLayer::ValidateTensorShapesFromInputs(), NormalizationLayer::ValidateTensorShapesFromInputs(), PermuteLayer::ValidateTensorShapesFromInputs(), SoftmaxLayer::ValidateTensorShapesFromInputs(), Pooling2dLayer::ValidateTensorShapesFromInputs(), InstanceNormalizationLayer::ValidateTensorShapesFromInputs(), DequantizeLayer::ValidateTensorShapesFromInputs(), ResizeLayer::ValidateTensorShapesFromInputs(), AbsLayer::ValidateTensorShapesFromInputs(), RsqrtLayer::ValidateTensorShapesFromInputs(), FakeQuantizationLayer::ValidateTensorShapesFromInputs(), FloorLayer::ValidateTensorShapesFromInputs(), StackLayer::ValidateTensorShapesFromInputs(), L2NormalizationLayer::ValidateTensorShapesFromInputs(), SwitchLayer::ValidateTensorShapesFromInputs(), MeanLayer::ValidateTensorShapesFromInputs(), ConvertFp16ToFp32Layer::ValidateTensorShapesFromInputs(), GatherLayer::ValidateTensorShapesFromInputs(), LogSoftmaxLayer::ValidateTensorShapesFromInputs(), StridedSliceLayer::ValidateTensorShapesFromInputs(), ArgMinMaxLayer::ValidateTensorShapesFromInputs(), ElementwiseUnaryLayer::ValidateTensorShapesFromInputs(), TransposeConvolution2dLayer::ValidateTensorShapesFromInputs(), DepthwiseConvolution2dLayer::ValidateTensorShapesFromInputs(), ComparisonLayer::ValidateTensorShapesFromInputs(), FullyConnectedLayer::ValidateTensorShapesFromInputs(), SpaceToDepthLayer::ValidateTensorShapesFromInputs(), DepthToSpaceLayer::ValidateTensorShapesFromInputs(), SpaceToBatchNdLayer::ValidateTensorShapesFromInputs(), PreluLayer::ValidateTensorShapesFromInputs(), Convolution2dLayer::ValidateTensorShapesFromInputs(), ConcatLayer::ValidateTensorShapesFromInputs(), BatchNormalizationLayer::ValidateTensorShapesFromInputs(), OutputLayer::ValidateTensorShapesFromInputs(), QuantizedLstmLayer::ValidateTensorShapesFromInputs(), LstmLayer::ValidateTensorShapesFromInputs(), and Layer::VerifyLayerConnections().
|
inlineoverridevirtual |
Implements IConnectableLayer.
|
inline |
Definition at line 231 of file Layer.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), SplitterLayer::CreateWorkload(), LoadedNetwork::EnqueueWorkload(), armnn::ForEachLayerInput(), Layer::GetPriority(), IWorkloadFactory::IsLayerSupported(), and Layer::Layer().
|
inlineoverridevirtual |
Implements IConnectableLayer.
Definition at line 305 of file Layer.hpp.
Referenced by AdditionLayer::Accept(), QuantizeLayer::Accept(), MultiplicationLayer::Accept(), DivisionLayer::Accept(), MaximumLayer::Accept(), SubtractionLayer::Accept(), MinimumLayer::Accept(), ActivationLayer::Accept(), AbsLayer::Accept(), NormalizationLayer::Accept(), FloorLayer::Accept(), InputLayer::Accept(), InstanceNormalizationLayer::Accept(), RsqrtLayer::Accept(), SoftmaxLayer::Accept(), L2NormalizationLayer::Accept(), SwitchLayer::Accept(), DequantizeLayer::Accept(), PadLayer::Accept(), GatherLayer::Accept(), LogSoftmaxLayer::Accept(), MeanLayer::Accept(), MergeLayer::Accept(), ArgMinMaxLayer::Accept(), DetectionPostProcessLayer::Accept(), Pooling2dLayer::Accept(), ElementwiseUnaryLayer::Accept(), ResizeLayer::Accept(), SliceLayer::Accept(), BatchToSpaceNdLayer::Accept(), StackLayer::Accept(), StridedSliceLayer::Accept(), PreluLayer::Accept(), SpaceToBatchNdLayer::Accept(), SpaceToDepthLayer::Accept(), DepthToSpaceLayer::Accept(), ComparisonLayer::Accept(), StandInLayer::Accept(), ConstantLayer::Accept(), BatchNormalizationLayer::Accept(), OutputLayer::Accept(), TransposeConvolution2dLayer::Accept(), FullyConnectedLayer::Accept(), DepthwiseConvolution2dLayer::Accept(), Convolution2dLayer::Accept(), ConcatLayer::Accept(), ReshapeLayer::Accept(), SplitterLayer::Accept(), PermuteLayer::Accept(), QuantizedLstmLayer::Accept(), LstmLayer::Accept(), Graph::AddCompatibilityLayers(), BOOST_AUTO_TEST_CASE(), armnnTfParser::CalcPadding(), QuantizeLayer::Clone(), ActivationLayer::Clone(), ConvertFp32ToFp16Layer::Clone(), RsqrtLayer::Clone(), DequantizeLayer::Clone(), NormalizationLayer::Clone(), PermuteLayer::Clone(), Pooling2dLayer::Clone(), FakeQuantizationLayer::Clone(), L2NormalizationLayer::Clone(), FloorLayer::Clone(), AbsLayer::Clone(), ReshapeLayer::Clone(), ResizeLayer::Clone(), MemImportLayer::Clone(), SwitchLayer::Clone(), SliceLayer::Clone(), InputLayer::Clone(), InstanceNormalizationLayer::Clone(), BatchToSpaceNdLayer::Clone(), DebugLayer::Clone(), StridedSliceLayer::Clone(), AdditionLayer::Clone(), SoftmaxLayer::Clone(), MemCopyLayer::Clone(), StackLayer::Clone(), MergeLayer::Clone(), MultiplicationLayer::Clone(), StandInLayer::Clone(), ArgMinMaxLayer::Clone(), PadLayer::Clone(), SpaceToDepthLayer::Clone(), DepthToSpaceLayer::Clone(), SpaceToBatchNdLayer::Clone(), DivisionLayer::Clone(), SubtractionLayer::Clone(), ElementwiseUnaryLayer::Clone(), MaximumLayer::Clone(), ConvertFp16ToFp32Layer::Clone(), LogSoftmaxLayer::Clone(), GatherLayer::Clone(), PreluLayer::Clone(), MeanLayer::Clone(), ComparisonLayer::Clone(), MinimumLayer::Clone(), ConstantLayer::Clone(), DetectionPostProcessLayer::Clone(), PreCompiledLayer::Clone(), TransposeConvolution2dLayer::Clone(), DepthwiseConvolution2dLayer::Clone(), FullyConnectedLayer::Clone(), Convolution2dLayer::Clone(), ConcatLayer::Clone(), SplitterLayer::Clone(), BatchNormalizationLayer::Clone(), OutputLayer::Clone(), QuantizedLstmLayer::Clone(), LstmLayer::Clone(), armnn::InsertConvertFp16ToFp32LayersBefore(), armnn::InsertConvertFp32ToFp16LayersAfter(), PermuteAsReshapeImpl::Run(), FoldPadIntoConvolution2dImpl::Run(), OptimizeConsecutiveReshapesImpl::Run(), PermuteAndBatchToSpaceAsDepthToSpaceImpl::Run(), and ErasedLayerNamesObservable::Update().
|
inline |
Definition at line 216 of file Layer.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), armnn::CheckScaleSetOnQuantizedType(), DebugLayer::CreateWorkload(), LoadedNetwork::GetOutputTensorInfo(), Layer::InferOutputShapes(), armnn::InsertDebugLayerAfter(), IsConnected(), and Layer::VerifyLayerConnections().
|
inlineoverridevirtual |
Implements IConnectableLayer.
Definition at line 307 of file Layer.hpp.
Referenced by CheckNumberOfInputSlot(), ConcatLayer::CreateWorkload(), LoadedNetwork::EnqueueWorkload(), Layer::GetDataType(), Layer::InferOutputShapes(), InputSlot::Insert(), armnn::InsertConvertFp16ToFp32LayersBefore(), StackLayer::ValidateTensorShapesFromInputs(), ConcatLayer::ValidateTensorShapesFromInputs(), and Layer::VerifyLayerConnections().
|
inlineoverridevirtual |
Implements IConnectableLayer.
Definition at line 308 of file Layer.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), armnnTfParser::CalcPadding(), OutputSlot::CalculateIndexOnOwner(), CheckNumberOfOutputSlot(), armnn::CheckScaleSetOnQuantizedType(), Layer::CreateTensorHandles(), LoadedNetwork::EnqueueWorkload(), Layer::InferOutputShapes(), InputSlot::Insert(), armnn::InsertConvertFp32ToFp16LayersAfter(), armnn::InsertDebugLayerAfter(), armnn::SelectTensorHandleStrategy(), SwitchLayer::ValidateTensorShapesFromInputs(), and DetectionPostProcessLayer::ValidateTensorShapesFromInputs().
|
inline |
Definition at line 221 of file Layer.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), Layer::CreateTensorHandles(), ConcatLayer::CreateWorkload(), LoadedNetwork::EnqueueWorkload(), InputSlot::Insert(), PermuteAsReshapeImpl::Run(), FoldPadIntoConvolution2dImpl::Run(), OptimizeConsecutiveReshapesImpl::Run(), PermuteAndBatchToSpaceAsDepthToSpaceImpl::Run(), and MovePermuteUpImpl::Run().
|
inline |
Definition at line 226 of file Layer.hpp.
|
inlineoverridevirtual |
Implements IConnectableLayer.
Definition at line 312 of file Layer.hpp.
Referenced by Graph::AddCompatibilityLayers(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), armnnTfParser::CalcPadding(), OutputSlot::CalculateIndexOnOwner(), armnn::CheckScaleSetOnQuantizedType(), CreateConvolution2dGraph(), CreateDepthwiseConvolution2dGraph(), CreateGatherGraph(), CreatePooling2dGraph(), CreateResizeBilinearGraph(), ConcatLayer::CreateTensorHandles(), SplitterLayer::CreateTensorHandles(), Layer::CreateTensorHandles(), SplitterLayer::CreateWorkload(), ConcatLayer::CreateWorkload(), Layer::GetDataType(), InputSlot::Insert(), armnn::InsertConvertFp16ToFp32LayersBefore(), armnn::InsertConvertFp32ToFp16LayersAfter(), armnn::InsertDebugLayerAfter(), IsConnected(), IWorkloadFactory::IsLayerSupported(), PermuteAsReshapeImpl::Run(), OptimizeConsecutiveReshapesImpl::Run(), FoldPadIntoConvolution2dImpl::Run(), PermuteAndBatchToSpaceAsDepthToSpaceImpl::Run(), OptimizeInverseConversionsImpl::Run(), OptimizeInversePermutesImpl::Run(), MovePermuteUpImpl::Run(), armnn::SelectTensorHandleStrategy(), ElementwiseBaseLayer::ValidateTensorShapesFromInputs(), QuantizeLayer::ValidateTensorShapesFromInputs(), ActivationLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToFp16Layer::ValidateTensorShapesFromInputs(), DebugLayer::ValidateTensorShapesFromInputs(), MergeLayer::ValidateTensorShapesFromInputs(), DequantizeLayer::ValidateTensorShapesFromInputs(), NormalizationLayer::ValidateTensorShapesFromInputs(), MemImportLayer::ValidateTensorShapesFromInputs(), FakeQuantizationLayer::ValidateTensorShapesFromInputs(), Pooling2dLayer::ValidateTensorShapesFromInputs(), BatchToSpaceNdLayer::ValidateTensorShapesFromInputs(), ReshapeLayer::ValidateTensorShapesFromInputs(), ResizeLayer::ValidateTensorShapesFromInputs(), RsqrtLayer::ValidateTensorShapesFromInputs(), SliceLayer::ValidateTensorShapesFromInputs(), MemCopyLayer::ValidateTensorShapesFromInputs(), SoftmaxLayer::ValidateTensorShapesFromInputs(), L2NormalizationLayer::ValidateTensorShapesFromInputs(), AbsLayer::ValidateTensorShapesFromInputs(), PermuteLayer::ValidateTensorShapesFromInputs(), FloorLayer::ValidateTensorShapesFromInputs(), StackLayer::ValidateTensorShapesFromInputs(), SwitchLayer::ValidateTensorShapesFromInputs(), InputLayer::ValidateTensorShapesFromInputs(), InstanceNormalizationLayer::ValidateTensorShapesFromInputs(), GatherLayer::ValidateTensorShapesFromInputs(), MeanLayer::ValidateTensorShapesFromInputs(), LogSoftmaxLayer::ValidateTensorShapesFromInputs(), ConvertFp16ToFp32Layer::ValidateTensorShapesFromInputs(), ConstantLayer::ValidateTensorShapesFromInputs(), ArgMinMaxLayer::ValidateTensorShapesFromInputs(), DetectionPostProcessLayer::ValidateTensorShapesFromInputs(), ElementwiseUnaryLayer::ValidateTensorShapesFromInputs(), StridedSliceLayer::ValidateTensorShapesFromInputs(), FullyConnectedLayer::ValidateTensorShapesFromInputs(), DepthToSpaceLayer::ValidateTensorShapesFromInputs(), PreluLayer::ValidateTensorShapesFromInputs(), ComparisonLayer::ValidateTensorShapesFromInputs(), DepthwiseConvolution2dLayer::ValidateTensorShapesFromInputs(), TransposeConvolution2dLayer::ValidateTensorShapesFromInputs(), SpaceToBatchNdLayer::ValidateTensorShapesFromInputs(), SpaceToDepthLayer::ValidateTensorShapesFromInputs(), Convolution2dLayer::ValidateTensorShapesFromInputs(), SplitterLayer::ValidateTensorShapesFromInputs(), BatchNormalizationLayer::ValidateTensorShapesFromInputs(), QuantizedLstmLayer::ValidateTensorShapesFromInputs(), and LstmLayer::ValidateTensorShapesFromInputs().
|
inlineoverridevirtual |
Implements IConnectableLayer.
|
inline |
Definition at line 232 of file Layer.hpp.
Referenced by Graph::AddCompatibilityLayers(), armnn::ForEachLayerOutput(), and IWorkloadFactory::IsLayerSupported().
LayerPriority GetPriority | ( | ) | const |
Definition at line 287 of file Layer.cpp.
References Layer::GetInputSlots(), OutputSlot::GetOwningLayer(), Layer::GetPriority(), Layer::GetType(), armnn::Input, and armnn::Output.
Referenced by Layer::GetPriority(), and SquashEqualSiblingsImpl< Comparable >::Run().
|
inline |
Definition at line 320 of file Layer.hpp.
Referenced by ErasedLayerNamesObservable::Update().
|
inline |
Definition at line 259 of file Layer.hpp.
Referenced by armnn::ApplyBackendOptimizations(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), armnn::CalculateEdgeStrategy(), armnn::CalculateSlotOption(), armnn::CalculateSlotOptionForInput(), armnn::CheckScaleSetOnQuantizedType(), ConcatLayer::CreateWorkload(), LoadedNetwork::EnqueueWorkload(), Layer::GetPriority(), Layer::InferOutputShapes(), ReshapeLayer::IsEqual(), PermuteLayer::IsEqual(), PermuteLayer::IsInverse(), IsLayerOfType(), IWorkloadFactory::IsLayerSupported(), MockBackend::OptimizeSubgraphView(), ConvertFp32NetworkToFp16Impl::Run(), AddDebugImpl::Run(), FoldPadIntoConvolution2dImpl::Run(), OptimizeConsecutiveReshapesImpl::Run(), PermuteAndBatchToSpaceAsDepthToSpaceImpl::Run(), OptimizeInverseConversionsImpl::Run(), MovePermuteUpImpl::Run(), OptimizeForTypeImpl< BaseType, OptimizeForConnectionImpl< BaseType, ChildType, Wrapped > >::Run(), armnn::SelectTensorHandleStrategy(), ElementwiseBaseLayer::ValidateTensorShapesFromInputs(), and Layer::VerifyLayerConnections().
|
overridevirtual |
Implements IConnectableLayer.
Reimplemented in LstmLayer, QuantizedLstmLayer, SplitterLayer, ConcatLayer, Convolution2dLayer, DepthwiseConvolution2dLayer, FullyConnectedLayer, TransposeConvolution2dLayer, ConstantLayer, StandInLayer, BatchToSpaceNdLayer, PermuteLayer, Pooling2dLayer, ReshapeLayer, ResizeLayer, SliceLayer, StackLayer, MergeLayer, ComparisonLayer, DepthToSpaceLayer, PreluLayer, SpaceToBatchNdLayer, SpaceToDepthLayer, ArgMinMaxLayer, ElementwiseUnaryLayer, StridedSliceLayer, and ElementwiseBaseLayer.
Definition at line 370 of file Layer.cpp.
References CHECK_LOCATION, armnn::GetLayerTypeAsCString(), Layer::GetNameStr(), Layer::GetNumInputSlots(), Layer::GetNumOutputSlots(), and Layer::GetType().
Referenced by QuantizeLayer::ValidateTensorShapesFromInputs(), ActivationLayer::ValidateTensorShapesFromInputs(), SoftmaxLayer::ValidateTensorShapesFromInputs(), RsqrtLayer::ValidateTensorShapesFromInputs(), SwitchLayer::ValidateTensorShapesFromInputs(), NormalizationLayer::ValidateTensorShapesFromInputs(), MemImportLayer::ValidateTensorShapesFromInputs(), AbsLayer::ValidateTensorShapesFromInputs(), FakeQuantizationLayer::ValidateTensorShapesFromInputs(), L2NormalizationLayer::ValidateTensorShapesFromInputs(), InstanceNormalizationLayer::ValidateTensorShapesFromInputs(), FloorLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToFp16Layer::ValidateTensorShapesFromInputs(), DequantizeLayer::ValidateTensorShapesFromInputs(), MemCopyLayer::ValidateTensorShapesFromInputs(), DebugLayer::ValidateTensorShapesFromInputs(), ConvertFp16ToFp32Layer::ValidateTensorShapesFromInputs(), LogSoftmaxLayer::ValidateTensorShapesFromInputs(), and BatchNormalizationLayer::ValidateTensorShapesFromInputs().
|
inline |
Definition at line 243 of file Layer.hpp.
Referenced by OptimizeForConnectionImpl< BaseType, ChildType, Wrapped >::Run().
|
inline |
Definition at line 292 of file Layer.hpp.
Referenced by Layer::ReleaseConstantData(), and ConvertConstants< Converter, Predicate >::Run().
|
inlineprotected |
Helper function to reduce duplication in *LayerCreateWorkload.
Definition at line 344 of file Layer.hpp.
References armnn::info.
Referenced by AbsLayer::CreateWorkload(), AdditionLayer::CreateWorkload(), FloorLayer::CreateWorkload(), QuantizeLayer::CreateWorkload(), ConvertFp32ToFp16Layer::CreateWorkload(), RsqrtLayer::CreateWorkload(), SwitchLayer::CreateWorkload(), DebugLayer::CreateWorkload(), MemCopyLayer::CreateWorkload(), DequantizeLayer::CreateWorkload(), MemImportLayer::CreateWorkload(), PreluLayer::CreateWorkload(), SubtractionLayer::CreateWorkload(), DivisionLayer::CreateWorkload(), ConvertFp16ToFp32Layer::CreateWorkload(), GatherLayer::CreateWorkload(), MinimumLayer::CreateWorkload(), MultiplicationLayer::CreateWorkload(), MaximumLayer::CreateWorkload(), ConstantLayer::CreateWorkload(), QuantizedLstmLayer::CreateWorkload(), and LayerWithParameters< ResizeDescriptor >::PrepInfoAndDesc().
|
virtual |
Reimplemented in ConstantLayer.
Definition at line 263 of file Layer.cpp.
References Layer::OperateOnConstantTensors().
Referenced by BOOST_AUTO_TEST_CASE().
Referenced by Graph::operator=(), and Graph::SubstituteSubgraph().
void ResetPriority | ( | ) | const |
|
virtual |
Helper to serialize the layer parameters to string. (currently used in DotSerializer and company).
Reimplemented in Convolution2dLayer, DepthwiseConvolution2dLayer, LayerWithParameters< Parameters >, LayerWithParameters< FakeQuantizationDescriptor >, LayerWithParameters< SoftmaxDescriptor >, LayerWithParameters< LstmDescriptor >, LayerWithParameters< LogSoftmaxDescriptor >, LayerWithParameters< PreCompiledDescriptor >, LayerWithParameters< BatchToSpaceNdDescriptor >, LayerWithParameters< PermuteDescriptor >, LayerWithParameters< SpaceToBatchNdDescriptor >, LayerWithParameters< DepthToSpaceDescriptor >, LayerWithParameters< ReshapeDescriptor >, LayerWithParameters< ElementwiseUnaryDescriptor >, LayerWithParameters< SpaceToDepthDescriptor >, LayerWithParameters< OriginsDescriptor >, LayerWithParameters< ViewsDescriptor >, LayerWithParameters< Pooling2dDescriptor >, LayerWithParameters< Convolution2dDescriptor >, LayerWithParameters< ActivationDescriptor >, LayerWithParameters< StandInDescriptor >, LayerWithParameters< StackDescriptor >, LayerWithParameters< MeanDescriptor >, LayerWithParameters< ComparisonDescriptor >, LayerWithParameters< InstanceNormalizationDescriptor >, LayerWithParameters< TransposeConvolution2dDescriptor >, LayerWithParameters< BatchNormalizationDescriptor >, LayerWithParameters< ArgMinMaxDescriptor >, LayerWithParameters< DetectionPostProcessDescriptor >, LayerWithParameters< PadDescriptor >, LayerWithParameters< L2NormalizationDescriptor >, LayerWithParameters< SliceDescriptor >, LayerWithParameters< DepthwiseConvolution2dDescriptor >, LayerWithParameters< NormalizationDescriptor >, LayerWithParameters< FullyConnectedDescriptor >, LayerWithParameters< StridedSliceDescriptor >, and LayerWithParameters< ResizeDescriptor >.
Definition at line 397 of file Layer.cpp.
References armnn::GetLayerTypeAsCString().
Referenced by LayerWithParameters< ResizeDescriptor >::SerializeLayerParameters().
|
inline |
Definition at line 264 of file Layer.hpp.
References CreateWorkload().
Referenced by armnn::AssignBackends(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), armnn::InsertDebugLayerAfter(), and MockBackend::OptimizeSubgraphView().
|
inline |
|
pure virtual |
Implemented in LstmLayer, QuantizedLstmLayer, OutputLayer, BatchNormalizationLayer, SplitterLayer, ConcatLayer, Convolution2dLayer, ComparisonLayer, DepthToSpaceLayer, DepthwiseConvolution2dLayer, FullyConnectedLayer, PreluLayer, SpaceToBatchNdLayer, SpaceToDepthLayer, TransposeConvolution2dLayer, ArgMinMaxLayer, DetectionPostProcessLayer, ElementwiseUnaryLayer, StridedSliceLayer, PreCompiledLayer, ConstantLayer, ConvertFp16ToFp32Layer, GatherLayer, LogSoftmaxLayer, MeanLayer, PadLayer, StandInLayer, AbsLayer, BatchToSpaceNdLayer, ConvertFp32ToFp16Layer, DebugLayer, DequantizeLayer, FakeQuantizationLayer, FloorLayer, InputLayer, InstanceNormalizationLayer, L2NormalizationLayer, MemCopyLayer, MemImportLayer, MergeLayer, NormalizationLayer, PermuteLayer, Pooling2dLayer, ReshapeLayer, ResizeLayer, RsqrtLayer, SliceLayer, SoftmaxLayer, StackLayer, SwitchLayer, ActivationLayer, QuantizeLayer, and ElementwiseBaseLayer.
void VerifyLayerConnections | ( | unsigned int | expectedConnections, |
const CheckLocation & | location | ||
) | const |
Definition at line 337 of file Layer.cpp.
References CheckLocation::AsString(), Layer::GetInputSlot(), armnn::GetLayerTypeAsCString(), Layer::GetNameStr(), Layer::GetNumInputSlots(), and Layer::GetType().
Referenced by ElementwiseBaseLayer::ValidateTensorShapesFromInputs(), QuantizeLayer::ValidateTensorShapesFromInputs(), ActivationLayer::ValidateTensorShapesFromInputs(), SwitchLayer::ValidateTensorShapesFromInputs(), AbsLayer::ValidateTensorShapesFromInputs(), Pooling2dLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToFp16Layer::ValidateTensorShapesFromInputs(), FakeQuantizationLayer::ValidateTensorShapesFromInputs(), SliceLayer::ValidateTensorShapesFromInputs(), ReshapeLayer::ValidateTensorShapesFromInputs(), ResizeLayer::ValidateTensorShapesFromInputs(), FloorLayer::ValidateTensorShapesFromInputs(), RsqrtLayer::ValidateTensorShapesFromInputs(), BatchToSpaceNdLayer::ValidateTensorShapesFromInputs(), SoftmaxLayer::ValidateTensorShapesFromInputs(), StackLayer::ValidateTensorShapesFromInputs(), PermuteLayer::ValidateTensorShapesFromInputs(), DebugLayer::ValidateTensorShapesFromInputs(), InstanceNormalizationLayer::ValidateTensorShapesFromInputs(), L2NormalizationLayer::ValidateTensorShapesFromInputs(), DequantizeLayer::ValidateTensorShapesFromInputs(), MemCopyLayer::ValidateTensorShapesFromInputs(), MemImportLayer::ValidateTensorShapesFromInputs(), MergeLayer::ValidateTensorShapesFromInputs(), NormalizationLayer::ValidateTensorShapesFromInputs(), ConvertFp16ToFp32Layer::ValidateTensorShapesFromInputs(), GatherLayer::ValidateTensorShapesFromInputs(), MeanLayer::ValidateTensorShapesFromInputs(), LogSoftmaxLayer::ValidateTensorShapesFromInputs(), StridedSliceLayer::ValidateTensorShapesFromInputs(), ElementwiseUnaryLayer::ValidateTensorShapesFromInputs(), ArgMinMaxLayer::ValidateTensorShapesFromInputs(), DetectionPostProcessLayer::ValidateTensorShapesFromInputs(), DepthwiseConvolution2dLayer::ValidateTensorShapesFromInputs(), SpaceToDepthLayer::ValidateTensorShapesFromInputs(), FullyConnectedLayer::ValidateTensorShapesFromInputs(), SpaceToBatchNdLayer::ValidateTensorShapesFromInputs(), TransposeConvolution2dLayer::ValidateTensorShapesFromInputs(), PreluLayer::ValidateTensorShapesFromInputs(), ComparisonLayer::ValidateTensorShapesFromInputs(), DepthToSpaceLayer::ValidateTensorShapesFromInputs(), Convolution2dLayer::ValidateTensorShapesFromInputs(), ConcatLayer::ValidateTensorShapesFromInputs(), BatchNormalizationLayer::ValidateTensorShapesFromInputs(), QuantizedLstmLayer::ValidateTensorShapesFromInputs(), and LstmLayer::ValidateTensorShapesFromInputs().
|
protected |
Definition at line 364 of file Layer.hpp.
Referenced by ConcatLayer::CreateWorkload(), SplitterLayer::CreateWorkload(), and Layer::Layer().