Compute Library
 21.11
ActivationLayer Class Referencefinal

Activation Layer. More...

#include <Layers.h>

Collaboration diagram for ActivationLayer:
[legend]

Public Member Functions

 ActivationLayer (ActivationLayerInfo act_info, const QuantizationInfo out_quant_info=QuantizationInfo())
 Construct an activation layer. More...
 
NodeID create_layer (IStream &s) override
 Create layer and add to the given stream. More...
 
- Public Member Functions inherited from ILayer
virtual ~ILayer ()=default
 Default destructor. More...
 
ILayerset_name (std::string name)
 Sets the name of the layer. More...
 
const std::string & name () const
 Layer name accessor. More...
 

Detailed Description

Activation Layer.

Definition at line 121 of file Layers.h.

Constructor & Destructor Documentation

◆ ActivationLayer()

ActivationLayer ( ActivationLayerInfo  act_info,
const QuantizationInfo  out_quant_info = QuantizationInfo() 
)
inline

Construct an activation layer.

Parameters
[in]act_infoActivation information
[in]out_quant_info(Optional) Output quantization info

Definition at line 129 of file Layers.h.

131  : _act_info(act_info),
132  _out_quant_info(std::move(out_quant_info))
133  {
134  }

Member Function Documentation

◆ create_layer()

NodeID create_layer ( IStream s)
inlineoverridevirtual

Create layer and add to the given stream.

Parameters
[in]sStream to add layer to.
Returns
ID of the created node.

Implements ILayer.

Definition at line 136 of file Layers.h.

References GraphBuilder::add_activation_node(), IStream::graph(), IStream::hints(), arm_compute::test::validation::input, ILayer::name(), IStream::tail_node(), and StreamHints::target_hint.

137  {
138  NodeParams common_params = { name(), s.hints().target_hint };
139  NodeIdxPair input = { s.tail_node(), 0 };
140  return GraphBuilder::add_activation_node(s.graph(), common_params, input, _act_info, std::move(_out_quant_info));
141  }
static NodeID add_activation_node(Graph &g, NodeParams params, NodeIdxPair input, ActivationLayerInfo act_info, const QuantizationInfo &out_quant_info=QuantizationInfo())
Adds an activation layer node to the graph.
const std::string & name() const
Layer name accessor.
Definition: ILayer.h:64

The documentation for this class was generated from the following file: