Compute Library
 22.05
DetectionOutputLayer Class Referencefinal

DetectionOutput Layer. More...

#include <Layers.h>

Collaboration diagram for DetectionOutputLayer:
[legend]

Public Member Functions

 DetectionOutputLayer (SubStream &&sub_stream_conf, SubStream &&sub_stream_prior, const DetectionOutputLayerInfo &detect_info)
 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

DetectionOutput Layer.

Definition at line 579 of file Layers.h.

Constructor & Destructor Documentation

◆ DetectionOutputLayer()

DetectionOutputLayer ( SubStream &&  sub_stream_conf,
SubStream &&  sub_stream_prior,
const DetectionOutputLayerInfo detect_info 
)
inline

Construct a detection output layer.

Parameters
[in]sub_stream_confConfidence graph sub-stream.
[in]sub_stream_priorPriorBox graph sub-stream.
[in]detect_infoDetectionOutput parameters.

Definition at line 588 of file Layers.h.

589  : _ss_conf(std::move(sub_stream_conf)), _ss_prior(std::move(sub_stream_prior)), _detect_info(detect_info)
590  {
591  }

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

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

594  {
595  NodeParams common_params = { name(), s.hints().target_hint };
596  NodeIdxPair input_loc = { s.tail_node(), 0 };
597  NodeIdxPair input_conf = { _ss_conf.tail_node(), 0 };
598  NodeIdxPair input_priorbox = { _ss_prior.tail_node(), 0 };
599  return GraphBuilder::add_detection_output_node(s.graph(), common_params, input_loc, input_conf, input_priorbox, _detect_info);
600  }
static NodeID add_detection_output_node(Graph &g, NodeParams params, NodeIdxPair input_loc, NodeIdxPair input_conf, NodeIdxPair input_priorbox, const DetectionOutputLayerInfo &detect_info)
Adds a detection output layer node to the graph.
NodeID tail_node()
Returns the tail node of the Stream.
Definition: IStream.h:65
const std::string & name() const
Layer name accessor.
Definition: ILayer.h:64

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