Apache SINGA
A distributed deep learning platform .
 All Classes Namespaces Files Functions Variables Typedefs Macros
Public Member Functions | List of all members
singa::Driver Class Reference

Public Member Functions

void Init (int argc, char **argv)
 Init SINGA, including init glog, parse job id and job conf from cmd line, and register built-in layer, worker, updater, param subclasses. More...
 
template<typename Subclass , typename Type >
int RegisterLayer (const Type &type)
 Register a Layer subclass. More...
 
template<typename Subclass , typename Type >
int RegisterUpdater (const Type &type)
 Register an Updater subclass. More...
 
template<typename Subclass , typename Type >
int RegisterLRGenerator (const Type &type)
 Register a learning rate generator subclasses. More...
 
template<typename Subclass , typename Type >
int RegisterWorker (const Type &type)
 Register a Worker subclass. More...
 
template<typename Subclass , typename Type >
int RegisterParam (const Type &type)
 Register a Param subclass. More...
 
template<typename Subclass , typename Type >
int RegisterParamGenerator (const Type &type)
 Register ParamGenerator subclasses for initalizing Param objects. More...
 
void Submit (bool resume, const JobProto &job)
 Submit the job configuration for starting the job. More...
 
int job_id () const
 
JobProto job_conf () const
 

Member Function Documentation

void singa::Driver::Init ( int  argc,
char **  argv 
)

Init SINGA, including init glog, parse job id and job conf from cmd line, and register built-in layer, worker, updater, param subclasses.

May be used for MPI init if it is used for message passing.

JobProto singa::Driver::job_conf ( ) const
inline
Returns
job conf path which is passed by users at the command line. It should at least contains the cluster configuration.
int singa::Driver::job_id ( ) const
inline
Returns
job ID which is generated by zookeeper and passed in by the launching script.
template<typename Subclass , typename Type >
int singa::Driver::RegisterLayer ( const Type &  type)

Register a Layer subclass.

Parameters
typelayer type ID. If called to register built-in subclasses, it is from LayerType; if called to register user-defined subclass, it is a string;
Returns
0 if success; otherwise -1.
template<typename Subclass , typename Type >
int singa::Driver::RegisterLRGenerator ( const Type &  type)

Register a learning rate generator subclasses.

Parameters
typeID of the subclass. If called to register built-in subclasses, it is from ChangeMethod; if called to register user-defined subclass, it is a string;
Returns
0 if success; otherwise -1.
template<typename Subclass , typename Type >
int singa::Driver::RegisterParam ( const Type &  type)

Register a Param subclass.

Parameters
typeID of the subclass. If called to register built-in subclasses, it is from ParamType; if called to register user-defined subclass, it is a string;
Returns
0 if success; otherwise -1.
template<typename Subclass , typename Type >
int singa::Driver::RegisterParamGenerator ( const Type &  type)

Register ParamGenerator subclasses for initalizing Param objects.

Parameters
typeID of the subclass. If called to register built-in subclasses, it is from InitMethod; if called to register user-defined subclass, it is a string;
Returns
0 if success; otherwise -1.
template<typename Subclass , typename Type >
int singa::Driver::RegisterUpdater ( const Type &  type)

Register an Updater subclass.

Parameters
typeID of the subclass. If called to register built-in subclasses, it is from UpdaterType; if called to register user-defined subclass, it is a string;
Returns
0 if success; otherwise -1.
template<typename Subclass , typename Type >
int singa::Driver::RegisterWorker ( const Type &  type)

Register a Worker subclass.

Parameters
typeID of the subclass. If called to register built-in subclasses, it is from TrainOneBatchAlg; if called to register user-defined subclass, it is a string;
Returns
0 if success; otherwise -1.
void singa::Driver::Submit ( bool  resume,
const JobProto &  job 
)

Submit the job configuration for starting the job.

Parameters
resumeresume from last checkpoint if true.
jobjob configuration

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