You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@singa.apache.org by "wangwei (JIRA)" <ji...@apache.org> on 2015/08/13 07:29:45 UTC
[jira] [Created] (SINGA-55) Refactor main.cc and singa.h to make it
easier for users to write driver programs
wangwei created SINGA-55:
----------------------------
Summary: Refactor main.cc and singa.h to make it easier for users to write driver programs
Key: SINGA-55
URL: https://issues.apache.org/jira/browse/SINGA-55
Project: Singa
Issue Type: Improvement
Reporter: wangwei
This ticket is a continuation of SINGA-36.
A function singa::Init(argc, argv) will be provided, which should be called at the beginning of the driver program to:
* init glogs, gflags (may remove the dependency on flags later), etc.
* register built-in layers, updaters, workers, params, etc.
* setup folders, e.g., log folder, checkpoint folder, etc.
* init future classes, e.g., MPI environment.
This function can be implemented as a static function in singa.h. singa.h also provides functions to register user classes, e.g., layers.
The user program would then look like :
{code}
#include "singa.h"
int main(int argc, char** argv) {
singa::Init(argc, argv);
singa::RegisterLayer(...);
singa::RegisterUpdater(...);
...
// prepare job conf
singa::SubmitJob(...);
return 0;
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)