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

#include <graph_gradient.h>

Public Member Functions

 GraphGradientMaker ()
 
void Make (const vector< OperatorDef * > &forward_def, const vector< string > &targets, GraphDef &new_def)
 
void Make (const GraphDef &forward_def, GraphDef &backward_def)
 
GraphDef Share (const GraphDef &input_def)
 
void SetTerms (const Map< string, string > &terms)
 
void SetOperatorPrefix (const string &prefix)
 
void SetOperatorSuffix (const string &suffix)
 
void AddExternalGrad (const string &name)
 
void AddIgnoreGrad (const string &name)
 

Constructor & Destructor Documentation

◆ GraphGradientMaker()

dragon::GraphGradientMaker::GraphGradientMaker ( )
inline

Member Function Documentation

◆ AddExternalGrad()

void dragon::GraphGradientMaker::AddExternalGrad ( const string &  name)
inline

◆ AddIgnoreGrad()

void dragon::GraphGradientMaker::AddIgnoreGrad ( const string &  name)
inline

◆ Make() [1/2]

void dragon::GraphGradientMaker::Make ( const vector< OperatorDef * > &  forward_def,
const vector< string > &  targets,
GraphDef &  new_def 
)

1) GradientGenerateOp

2) GradientOp

3) GradientGatherOp

◆ Make() [2/2]

void dragon::GraphGradientMaker::Make ( const GraphDef &  forward_def,
GraphDef &  backward_def 
)

◆ SetOperatorPrefix()

void dragon::GraphGradientMaker::SetOperatorPrefix ( const string &  prefix)
inline

◆ SetOperatorSuffix()

void dragon::GraphGradientMaker::SetOperatorSuffix ( const string &  suffix)
inline

◆ SetTerms()

void dragon::GraphGradientMaker::SetTerms ( const Map< string, string > &  terms)
inline

◆ Share()

GraphDef dragon::GraphGradientMaker::Share ( const GraphDef &  input_def)

LIFO is more memory efficent than FIFO usually, Because the larger gradients will bring out later.

Memory distribution turns out to be uniform, if the early temporary tensors are selected prior.


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