Compute Library
 21.11
ReshapeLayer Class Referencefinal

Reshape Layer. More...

#include <Layers.h>

Collaboration diagram for ReshapeLayer:
[legend]

Public Member Functions

 ReshapeLayer (TensorShape shape)
 Construct a reshape 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

Reshape Layer.

Definition at line 1190 of file Layers.h.

Constructor & Destructor Documentation

◆ ReshapeLayer()

ReshapeLayer ( TensorShape  shape)
inline

Construct a reshape layer.

Parameters
[in]shapeTarget shape.

Definition at line 1197 of file Layers.h.

1198  : _shape(shape)
1199  {
1200  }

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 1202 of file Layers.h.

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

1203  {
1204  NodeParams common_params = { name(), s.hints().target_hint };
1205  NodeIdxPair input = { s.tail_node(), 0 };
1206  return GraphBuilder::add_reshape_node(s.graph(), common_params, input, _shape);
1207  }
static NodeID add_reshape_node(Graph &g, NodeParams params, NodeIdxPair input, TensorShape shape)
Adds a reshape 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: