OpenCV 5.0.0-pre
Open Source Computer Vision
Loading...
Searching...
No Matches
cv::dnn::Graph Class Referenceabstract

Represents graph or subgraph of a model. The graph (in mathematical terms it's rather a multigraph) is represented as a topologically-sorted linear sequence of operations. Each operation is a smart pointer to a Layer (some of its derivative class instance), which includes a list of inputs and outputs, as well as an optional list of subgraphs (e.g. 'If' contains 2 subgraphs). More...

#include <opencv2/dnn/dnn.hpp>

Collaboration diagram for cv::dnn::Graph:

Public Member Functions

virtual ~Graph ()
 
virtual Arg append (Ptr< Layer > &layer, const std::string &outname=std::string())=0
 
virtual const std::vector< Arg > & append (Ptr< Layer > &layer, const std::vector< std::string > &outnames=std::vector< std::string >())=0
 
virtual void clear ()=0
 
virtual std::ostream & dump (std::ostream &strm, int indent, bool comma)=0
 
virtual bool empty () const =0
 
virtual const std::vector< Arg > & inputs () const =0
 
virtual std::string name () const =0
 
virtual const std::vector< Arg > & outputs () const =0
 
virtual const std::vector< Ptr< Layer > > & prog () const =0
 
virtual void setOutputs (const std::vector< Arg > &outputs)=0
 
virtual void setProg (const std::vector< Ptr< Layer > > &newprog)=0
 

Static Public Member Functions

static Ptr< Graphcreate (void *netimpl, const std::string &name, const std::vector< Arg > &inputs)
 

Detailed Description

Represents graph or subgraph of a model. The graph (in mathematical terms it's rather a multigraph) is represented as a topologically-sorted linear sequence of operations. Each operation is a smart pointer to a Layer (some of its derivative class instance), which includes a list of inputs and outputs, as well as an optional list of subgraphs (e.g. 'If' contains 2 subgraphs).

Constructor & Destructor Documentation

◆ ~Graph()

virtual cv::dnn::Graph::~Graph ( )
virtual

Member Function Documentation

◆ append() [1/2]

virtual Arg cv::dnn::Graph::append ( Ptr< Layer > & layer,
const std::string & outname = std::string() )
pure virtual

◆ append() [2/2]

virtual const std::vector< Arg > & cv::dnn::Graph::append ( Ptr< Layer > & layer,
const std::vector< std::string > & outnames = std::vector< std::string >() )
pure virtual

◆ clear()

virtual void cv::dnn::Graph::clear ( )
pure virtual

◆ create()

static Ptr< Graph > cv::dnn::Graph::create ( void * netimpl,
const std::string & name,
const std::vector< Arg > & inputs )
static

◆ dump()

virtual std::ostream & cv::dnn::Graph::dump ( std::ostream & strm,
int indent,
bool comma )
pure virtual

◆ empty()

virtual bool cv::dnn::Graph::empty ( ) const
pure virtual

◆ inputs()

virtual const std::vector< Arg > & cv::dnn::Graph::inputs ( ) const
pure virtual

◆ name()

virtual std::string cv::dnn::Graph::name ( ) const
pure virtual

◆ outputs()

virtual const std::vector< Arg > & cv::dnn::Graph::outputs ( ) const
pure virtual

◆ prog()

virtual const std::vector< Ptr< Layer > > & cv::dnn::Graph::prog ( ) const
pure virtual

◆ setOutputs()

virtual void cv::dnn::Graph::setOutputs ( const std::vector< Arg > & outputs)
pure virtual

◆ setProg()

virtual void cv::dnn::Graph::setProg ( const std::vector< Ptr< Layer > > & newprog)
pure virtual

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