SINGA-115 - Print layer debug information in the neural net graph file check with cpplint
Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/138599fd Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/138599fd Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/138599fd Branch: refs/heads/master Commit: 138599fd1f9bf011cd7a3dfb32101ba86081a374 Parents: c8cb913 Author: WANG Sheng <[email protected]> Authored: Fri Dec 25 17:01:26 2015 +0800 Committer: WANG Sheng <[email protected]> Committed: Fri Dec 25 17:01:26 2015 +0800 ---------------------------------------------------------------------- include/singa/neuralnet/neuralnet.h | 1 + src/utils/common.cc | 1 - src/utils/graph.cc | 6 +++--- 3 files changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/138599fd/include/singa/neuralnet/neuralnet.h ---------------------------------------------------------------------- diff --git a/include/singa/neuralnet/neuralnet.h b/include/singa/neuralnet/neuralnet.h index be6fcc5..b4105d3 100644 --- a/include/singa/neuralnet/neuralnet.h +++ b/include/singa/neuralnet/neuralnet.h @@ -116,6 +116,7 @@ class NeuralNet { * @param include_shape if true label the node with shape info */ const Graph ToGraph(bool include_shape) const; + protected: /** * Create a neural net graph, one node for each layer. http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/138599fd/src/utils/common.cc ---------------------------------------------------------------------- diff --git a/src/utils/common.cc b/src/utils/common.cc index c75a139..73d1f69 100644 --- a/src/utils/common.cc +++ b/src/utils/common.cc @@ -213,7 +213,6 @@ const vector<int> PartitionSlices(int num, const vector<int>& slices) { } disp += " " + std::to_string(slices[i]); } - // DLOG(INFO) << "partition slice (avg = " << avg << ", num = " << num << "):" << disp; return slice2box; } http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/138599fd/src/utils/graph.cc ---------------------------------------------------------------------- diff --git a/src/utils/graph.cc b/src/utils/graph.cc index 9a23773..f38ea53 100644 --- a/src/utils/graph.cc +++ b/src/utils/graph.cc @@ -20,12 +20,12 @@ *************************************************************/ #include "singa/utils/graph.h" -#include "singa/utils/common.h" #include <glog/logging.h> #include <algorithm> #include <queue> #include <unordered_set> +#include "singa/utils/common.h" namespace singa { @@ -97,8 +97,8 @@ Node* Graph::AddNode(const string& name) { return node; } -Node* Graph::AddNode(const string& name, const std::map<string, string>& attrs) -{ +Node* Graph::AddNode(const string& name, + const std::map<string, string>& attrs) { Node* node = new Node(name, attrs); AddNode(node); return node;
