Compute Library
PReluLayer Class Referencefinal

PRelu Layer. More...

#include <Layers.h>

Collaboration diagram for PReluLayer:

Public Member Functions

 PReluLayer (SubStream &&sub_stream0, SubStream &&sub_stream1)
 Construct an PRelu operation 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

PRelu Layer.

Definition at line 1001 of file Layers.h.

Constructor & Destructor Documentation

◆ PReluLayer()

PReluLayer ( SubStream &&  sub_stream0,
SubStream &&  sub_stream1 

Construct an PRelu operation layer.

[in]sub_stream0First graph sub-stream
[in]sub_stream1First graph sub-stream

Definition at line 1009 of file Layers.h.

1010  : _ss0(std::move(sub_stream0)), _ss1(std::move(sub_stream1))
1011  {
1012  }

Member Function Documentation

◆ create_layer()

NodeID create_layer ( IStream s)

Create layer and add to the given stream.

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

Implements ILayer.

Definition at line 1014 of file Layers.h.

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

1015  {
1016  NodeParams common_params = { name(), s.hints().target_hint };
1017  NodeIdxPair input = { _ss0.tail_node(), 0 };
1018  NodeIdxPair alpha = { _ss1.tail_node(), 0 };
1020  return GraphBuilder::add_prelu_node(s.graph(), common_params, input, alpha);
1021  }
static NodeID add_prelu_node(Graph &g, NodeParams params, NodeIdxPair input, NodeIdxPair alpha)
Adds a prelu layer node to the graph.
NodeID tail_node()
Returns the tail node of the Stream.
Definition: IStream.h:65
const std::string & name() const
Layer name accessor.
Definition: ILayer.h:64

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