Compute Library
PadLayer Class Referencefinal

Pad Layer. More...

#include <Layers.h>

Collaboration diagram for PadLayer:

Public Member Functions

 PadLayer (PaddingList padding, PixelValue pad_value=PixelValue())
 Construct a pad 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

Pad Layer.

Definition at line 923 of file Layers.h.

Constructor & Destructor Documentation

◆ PadLayer()

PadLayer ( PaddingList  padding,
PixelValue  pad_value = PixelValue() 

Construct a pad layer.

[in]paddingThe padding for each spatial dimension of the input tensor. The pair padding[i] specifies the front and the end padding in the i-th dimension.
[in]pad_valuePadding value to use. Defaults to 0.

Definition at line 932 of file Layers.h.

933  : _padding(padding), _pad_value(pad_value)
934  {
935  }

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

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

938  {
939  NodeParams common_params = { name(), s.hints().target_hint };
940  NodeIdxPair input = { s.tail_node(), 0 };
941  return GraphBuilder::add_pad_node(s.graph(), common_params, input, _padding, _pad_value);
942  }
static NodeID add_pad_node(Graph &g, NodeParams params, NodeIdxPair input, const PaddingList &paddings, PixelValue pad_value=PixelValue())
Adds a pad 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: