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

#include <graph.h>

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

Public Member Functions

 GraphBase (const GraphDef &def, Workspace *ws)
 Default constructor. More...
 
virtual ~GraphBase ()
 Default deconstructor. More...
 
virtual bool Create (const GraphDef &def, Workspace *ws)=0
 Create a graph from the optimized def. More...
 
virtual bool Run (const string &include, const string &exclude, int stream_id=0)=0
 Run the graph once synchronously. More...
 
string name () const
 Return the name of this graph. More...
 

Protected Attributes

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

◆ GraphBase()

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

Default constructor.

◆ ~GraphBase()

virtual dragon::GraphBase::~GraphBase ( )
inlinevirtual

Default deconstructor.

Member Function Documentation

◆ Create()

virtual bool dragon::GraphBase::Create ( const GraphDef &  def,
Workspace ws 
)
pure virtual

Create a graph from the optimized def.

Implemented in dragon::Graph.

◆ name()

string dragon::GraphBase::name ( ) const
inline

Return the name of this graph.

◆ Run()

virtual bool dragon::GraphBase::Run ( const string &  include,
const string &  exclude,
int  stream_id = 0 
)
pure virtual

Run the graph once synchronously.

Implemented in dragon::Graph.

Member Data Documentation

◆ args_

Map<string, Argument> dragon::GraphBase::args_
protected

Store the defined arguments.

◆ name_

string dragon::GraphBase::name_
protected

Store the name and running phase.

◆ phase_

string dragon::GraphBase::phase_
protected

◆ ws_

Workspace* dragon::GraphBase::ws_
protected

Store the parent workspace.


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