13 template <
typename Parameters>
31 unsigned int numOutputSlots,
33 const Parameters& param,
35 :
Layer(numInputSlots, numOutputSlots, type, name)
43 template <
typename QueueDescriptor>
46 descriptor.m_Parameters =
m_Param;
69 auto &constantLayer =
static_cast<ConstantLayer&
>(inputLayer);
71 tensors.push_back(constantLayer.m_LayerOutput);
A layer that the constant data can be bound to.
std::vector< std::reference_wrapper< const std::shared_ptr< ConstTensorHandle > >> ImmutableConstantTensors
virtual void ExecuteStrategy(const IConnectableLayer *layer, const armnn::BaseDescriptor &descriptor, const std::vector< armnn::ConstTensor > &constants, const char *name, const armnn::LayerBindingId id=0)=0
WorkloadInfo PrepInfoAndDesc(QueueDescriptor &descriptor) const
Helper function to reduce duplication in *Layer::CreateWorkload.
const char * GetName() const override
Returns the name of the layer.
unsigned int GetNumInputSlots() const override
Returns the number of connectable input slots.
virtual void SerializeLayerParameters(ParameterStringifyFunction &fn) const
Helper to serialize the layer parameters to string.
const InputSlot & GetInputSlot(unsigned int index) const override
Get a const input slot handle by slot index.
bool GetAllowExpandedDims() const
LayerWithParameters(unsigned int numInputSlots, unsigned int numOutputSlots, LayerType type, const Parameters ¶m, const char *name)
void SerializeLayerParameters(ParameterStringifyFunction &fn) const override
Helper to serialize the layer parameters to string (currently used in DotSerializer and company).
WorkloadInfo PrepInfoAndDesc(QueueDescriptor &descriptor) const
Helper function to reduce duplication in *Layer::CreateWorkload.
void ExecuteStrategy(IStrategy &strategy) const override
Apply a visitor to this layer.
Parameters DescriptorType
Parameters m_Param
The parameters for the layer (not including tensor-valued weights etc.).
Layer::ImmutableConstantTensors GetConnectedConstantAsInputTensors() const
~LayerWithParameters()=default
const Parameters & GetParameters() const override
If the layer has a descriptor return it.
Layer & GetOwningLayer() const
Copyright (c) 2021 ARM Limited and Contributors.
LayerType
When adding a new layer, adapt also the LastLayer enum value in the enum class LayerType below.
std::function< void(const std::string &name, const std::string &value)> ParameterStringifyFunction
static void Serialize(ParameterStringifyFunction &, const LayerParameter &)
Contains information about TensorInfos of a layer.