Dragon - C++ API
A Computation Graph Virtual Machine Based Deep Learning Framework
Public Member Functions | Protected Attributes | List of all members
dragon::Graph Class Reference

#include <graph.h>

Inheritance diagram for dragon::Graph:
dragon::GraphBase

Public Member Functions

 Graph (const GraphDef &def, Workspace *ws)
 Default constructor. More...
 
virtual ~Graph ()
 Default deconstructor. More...
 
bool Create (const GraphDef &def, Workspace *ws) override
 Create a graph from the optimized def. More...
 
bool Run (const string &include, const string &exclude, int stream_id=0) override
 Run the graph once synchronously. More...
 
Workspacews () const
 Return the parent workspace. More...
 
- Public Member Functions inherited from dragon::GraphBase
 GraphBase (const GraphDef &def, Workspace *ws)
 Default constructor. More...
 
virtual ~GraphBase ()
 Default deconstructor. More...
 
string name () const
 Return the name of this graph. More...
 

Protected Attributes

vector< OperatorBase * > ops_
 Store the internal operators. More...
 
- Protected Attributes inherited from dragon::GraphBase
string name_
 Store the name and running phase. More...
 
string phase_
 
Map< string, Argument > args_
 Store the defined arguments. More...
 
Workspacews_
 Store the parent workspace. More...
 

Constructor & Destructor Documentation

◆ Graph()

dragon::Graph::Graph ( const GraphDef &  def,
Workspace ws 
)

Default constructor.

◆ ~Graph()

virtual dragon::Graph::~Graph ( )
inlinevirtual

Default deconstructor.

Member Function Documentation

◆ Create()

bool dragon::Graph::Create ( const GraphDef &  def,
Workspace ws 
)
overridevirtual

Create a graph from the optimized def.

Implements dragon::GraphBase.

◆ Run()

bool dragon::Graph::Run ( const string &  include,
const string &  exclude,
int  stream_id = 0 
)
overridevirtual

Run the graph once synchronously.

Implements dragon::GraphBase.

◆ ws()

Workspace* dragon::Graph::ws ( ) const
inline

Return the parent workspace.

Member Data Documentation

◆ ops_

vector<OperatorBase*> dragon::Graph::ops_
protected

Store the internal operators.


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