Compute Library
DetectionPostProcessLayer Class Referencefinal

DetectionOutputPostProcess Layer. More...

#include <Layers.h>

Collaboration diagram for DetectionPostProcessLayer:

Public Member Functions

 DetectionPostProcessLayer (SubStream &&sub_stream_class_prediction, DetectionPostProcessLayerInfo detect_info, ITensorAccessorUPtr anchors, const QuantizationInfo out_quant_info=QuantizationInfo())
 Construct a detection output 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

DetectionOutputPostProcess Layer.

Definition at line 608 of file Layers.h.

Constructor & Destructor Documentation

◆ DetectionPostProcessLayer()

DetectionPostProcessLayer ( SubStream &&  sub_stream_class_prediction,
DetectionPostProcessLayerInfo  detect_info,
ITensorAccessorUPtr  anchors,
const QuantizationInfo  out_quant_info = QuantizationInfo() 

Construct a detection output layer.

[in]sub_stream_class_predictionClass prediction graph sub-stream.
[in]detect_infoDetectionOutput parameters.
[in]anchorsAccessor to get anchors tensor data from.
[in]out_quant_info(Optional) Output quantization info

Definition at line 618 of file Layers.h.

620  : _sub_stream_class_prediction(std::move(sub_stream_class_prediction)), _detect_info(detect_info), _anchors(std::move(anchors)), _out_quant_info(std::move(out_quant_info))
621  {
622  }

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

References GraphBuilder::add_detection_post_process_node(), ARM_COMPUTE_ERROR_ON, IStream::graph(), IStream::hints(), ILayer::name(), IStream::tail_node(), and StreamHints::target_hint.

625  {
626  ARM_COMPUTE_ERROR_ON(_anchors == nullptr);
628  NodeParams common_params = { name(), s.hints().target_hint };
629  NodeIdxPair input_box_encoding = { s.tail_node(), 0 };
630  NodeIdxPair input_class_prediction = { _sub_stream_class_prediction.tail_node(), 0 };
631  return GraphBuilder::add_detection_post_process_node(s.graph(), common_params, input_box_encoding, input_class_prediction, _detect_info, std::move(_anchors), std::move(_out_quant_info));
632  }
#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
NodeID tail_node()
Returns the tail node of the Stream.
Definition: IStream.h:65
static NodeID add_detection_post_process_node(Graph &g, NodeParams params, NodeIdxPair input_box_encoding, NodeIdxPair input_class_prediction, const DetectionPostProcessLayerInfo &detect_info, ITensorAccessorUPtr anchors_accessor=nullptr, const QuantizationInfo &anchor_quant_info=QuantizationInfo())
Adds a detection post process 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: