You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@singa.apache.org by wa...@apache.org on 2015/09/27 16:34:36 UTC
[13/13] incubator-singa git commit: SINGA-72 Minor updates to be
consisten with documentation
SINGA-72 Minor updates to be consisten with documentation
format driver.cc, rnnl.h, param.cc
close #69
close #65
close #63
close #39
Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/2f665370
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/2f665370
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/2f665370
Branch: refs/heads/master
Commit: 2f665370bda5ff217fb5562125567ff305ddf8af
Parents: 45e5026
Author: wang sheng <wa...@gmail.com>
Authored: Sun Sep 27 22:12:00 2015 +0800
Committer: wang sheng <wa...@gmail.com>
Committed: Sun Sep 27 22:31:37 2015 +0800
----------------------------------------------------------------------
examples/rnnlm/rnnlm.h | 3 +++
src/driver.cc | 7 +++++--
src/utils/param.cc | 2 +-
3 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/2f665370/examples/rnnlm/rnnlm.h
----------------------------------------------------------------------
diff --git a/examples/rnnlm/rnnlm.h b/examples/rnnlm/rnnlm.h
index ad0918e..8ad7a68 100644
--- a/examples/rnnlm/rnnlm.h
+++ b/examples/rnnlm/rnnlm.h
@@ -18,8 +18,11 @@
* under the License.
*
*************************************************************/
+
#ifndef EXAMPLES_RNNLM_RNNLM_H_
#define EXAMPLES_RNNLM_RNNLM_H_
+
+#include <string>
#include <vector>
#include "./singa.h"
#include "./rnnlm.pb.h"
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/2f665370/src/driver.cc
----------------------------------------------------------------------
diff --git a/src/driver.cc b/src/driver.cc
index d3f0f3e..28669fa 100644
--- a/src/driver.cc
+++ b/src/driver.cc
@@ -19,15 +19,19 @@
*
*************************************************************/
+#include "./driver.h"
+
#include <glog/logging.h>
#include <set>
#include <string>
+#include <vector>
#include "neuralnet/layer.h"
#include "utils/common.h"
#include "utils/tinydir.h"
#include "utils/cluster.h"
+#include "./server.h"
#include "./stub.h"
-#include "./driver.h"
+#include "./worker.h"
extern "C" void openblas_set_num_threads(int num);
@@ -109,7 +113,6 @@ void Driver::Init(int argc, char **argv) {
RegisterParamGenerator<UniformSqrtFanInOutGen>(kUniformSqrtFanInOut);
}
-
void Driver::Train(bool resume, const JobProto& job_conf) {
Cluster::Setup(job_id_, singa_conf_, job_conf.cluster());
if (singa_conf_.has_log_dir())
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/2f665370/src/utils/param.cc
----------------------------------------------------------------------
diff --git a/src/utils/param.cc b/src/utils/param.cc
index 1ee4dcd..83bd818 100644
--- a/src/utils/param.cc
+++ b/src/utils/param.cc
@@ -118,7 +118,7 @@ const vector<int> Param::ComputeSlices(int num, const vector<Param*>& params) {
// is assgined a sub-set of slices)
auto param_slice = Slice(num, paramsize);
vector<int> slices;
- for (auto const vec: param_slice)
+ for (auto const vec : param_slice)
for (int len : vec)
slices.push_back(len);
return slices;