Compute Library
PermuteLayer Class Referencefinal

Permute Layer. More...

#include <Layers.h>

Collaboration diagram for PermuteLayer:

Public Member Functions

 PermuteLayer (PermutationVector perm, DataLayout layout=DataLayout::UNKNOWN)
 Construct a permute 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

Permute Layer.

Definition at line 950 of file Layers.h.

Constructor & Destructor Documentation

◆ PermuteLayer()

Construct a permute layer.

[in]permPermutation vector.
[in]layout(Optional) Data layout to assign to permuted tensor. If UNKNOWN then the input's layout will be used.

Definition at line 959 of file Layers.h.

960  : _perm(perm), _layout(layout)
961  {
962  }

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

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

965  {
966  NodeParams common_params = { name(), s.hints().target_hint };
967  NodeIdxPair input = { s.tail_node(), 0 };
968  return GraphBuilder::add_permute_node(s.graph(), common_params, input, _perm, _layout);
969  }
static NodeID add_permute_node(Graph &g, NodeParams params, NodeIdxPair input, PermutationVector perm, DataLayout layout=DataLayout::UNKNOWN)
Adds a permute 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: