Compute Library
 22.05
StridedSliceLayer Class Referencefinal

StridedSlice Layer. More...

#include <Layers.h>

Collaboration diagram for StridedSliceLayer:
[legend]

Public Member Functions

 StridedSliceLayer (Coordinates &starts, Coordinates &ends, BiStrides &strides, StridedSliceLayerInfo strided_slice_info)
 Construct a strided slice 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

StridedSlice Layer.

Definition at line 1433 of file Layers.h.

Constructor & Destructor Documentation

◆ StridedSliceLayer()

StridedSliceLayer ( Coordinates starts,
Coordinates ends,
BiStrides strides,
StridedSliceLayerInfo  strided_slice_info 
)
inline

Construct a strided slice layer.

Parameters
[in]startsThe starts of the dimensions of the input tensor to be sliced. The length must be of rank(input).
[in]endsThe ends of the dimensions of the input tensor to be sliced. The length must be of rank(input).
[in]stridesThe strides of the dimensions of the input tensor to be sliced. The length must be of rank(input).
[in]strided_slice_infoContains masks for the starts, ends and strides

Definition at line 1443 of file Layers.h.

1444  : _starts(starts), _ends(ends), _strides(strides), _info(strided_slice_info)
1445  {
1446  }

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

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

1449  {
1450  NodeParams common_params = { name(), s.hints().target_hint };
1451  NodeIdxPair input = { s.tail_node(), 0 };
1452  return GraphBuilder::add_strided_slice_node(s.graph(), common_params, input, _starts, _ends, _strides, _info);
1453  }
const std::string & name() const
Layer name accessor.
Definition: ILayer.h:64
static NodeID add_strided_slice_node(Graph &g, NodeParams params, NodeIdxPair input, Coordinates &starts, Coordinates &ends, BiStrides &strides, StridedSliceLayerInfo info)
Adds a strided slice node to the graph.

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