Compute Library
 22.05
NormalizePlanarYUVLayer Class Referencefinal

Normalize planar YUV Layer. More...

#include <Layers.h>

Collaboration diagram for NormalizePlanarYUVLayer:
[legend]

Public Member Functions

 NormalizePlanarYUVLayer (ITensorAccessorUPtr mean, ITensorAccessorUPtr std)
 Construct a normalize planar YUV 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

Normalize planar YUV Layer.

Definition at line 892 of file Layers.h.

Constructor & Destructor Documentation

◆ NormalizePlanarYUVLayer()

Construct a normalize planar YUV layer.

Parameters
[in]meanAccessor to get mean tensor data from.
[in]stdAccessor to get std tensor data from.

Definition at line 900 of file Layers.h.

902  : _mean(std::move(mean)), _std(std::move(std))
903  {
904  }

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

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

907  {
908  ARM_COMPUTE_ERROR_ON(_mean == nullptr);
909  ARM_COMPUTE_ERROR_ON(_std == nullptr);
910 
911  NodeParams common_params = { name(), s.hints().target_hint };
912  NodeIdxPair input = { s.tail_node(), 0 };
913  return GraphBuilder::add_normalize_planar_yuv_node(s.graph(), common_params, input,
914  std::move(_mean), std::move(_std));
915  }
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Definition: Error.h:466
static NodeID add_normalize_planar_yuv_node(Graph &g, NodeParams params, NodeIdxPair input, ITensorAccessorUPtr mean_accessor=nullptr, ITensorAccessorUPtr std_accessor=nullptr)
Adds a normalize planar YUV 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: