22 #ifndef SINGA_DRIVER_H_
23 #define SINGA_DRIVER_H_
37 void Init(
int argc,
char** argv);
46 template<
typename Sub
class,
typename Type>
56 template<
typename Sub
class,
typename Type>
66 template<
typename Sub
class,
typename Type>
76 template<
typename Sub
class,
typename Type>
86 template<
typename Sub
class,
typename Type>
96 template<
typename Sub
class,
typename Type>
104 void Submit(
bool resume,
const JobProto& job);
109 inline int job_id()
const {
return job_id_; }
114 inline JobProto
job_conf()
const {
return job_conf_; }
119 SingaProto singa_conf_;
122 template<
typename Sub
class,
typename Type>
125 factory->Register(type, CreateInstance(Subclass,
Layer));
129 template<
typename Sub
class,
typename Type>
132 factory->Register(type, CreateInstance(Subclass,
Param));
136 template<
typename Sub
class,
typename Type>
139 factory->Register(type, CreateInstance(Subclass,
ParamGenerator));
143 template<
typename Sub
class,
typename Type>
146 factory->Register(type, CreateInstance(Subclass,
Updater));
150 template<
typename Sub
class,
typename Type>
153 factory->Register(type, CreateInstance(Subclass,
LRGenerator));
157 template<
typename Sub
class,
typename Type>
160 factory->Register(type, CreateInstance(Subclass,
Worker));
166 #endif // SINGA_DRIVER_H_
JobProto job_conf() const
Definition: driver.h:114
int RegisterLRGenerator(const Type &type)
Register a learning rate generator subclasses.
Definition: driver.h:151
The Worker class which runs the training algorithm.
Definition: worker.h:42
Base learning rate generator.
Definition: updater.h:36
Base paramter class.
Definition: param.h:93
int RegisterParam(const Type &type)
Register a Param subclass.
Definition: driver.h:130
int RegisterParamGenerator(const Type &type)
Register ParamGenerator subclasses for initalizing Param objects.
Definition: driver.h:137
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...
int RegisterWorker(const Type &type)
Register a Worker subclass.
Definition: driver.h:158
Base parameter generator which intializes parameter values.
Definition: param.h:37
Updater for Param.
Definition: updater.h:88
int job_id() const
Definition: driver.h:109
Base layer class.
Definition: layer.h:44
void Submit(bool resume, const JobProto &job)
Submit the job configuration for starting the job.
int RegisterUpdater(const Type &type)
Register an Updater subclass.
Definition: driver.h:144
Thread-safe implementation for C++11 according to http://stackoverflow.com/questions/2576022/efficien...
Definition: singleton.h:30
int RegisterLayer(const Type &type)
Register a Layer subclass.
Definition: driver.h:123