You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@singa.apache.org by zh...@apache.org on 2016/04/06 10:38:14 UTC
[4/4] incubator-singa git commit: SINGA-126 Python Binding for
Interactive Training
SINGA-126 Python Binding for Interactive Training
Revise driver.i, neurlanet.h, neuralnet.cc
- to remove CreateNeuralNet() function
Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/c97b970d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/c97b970d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/c97b970d
Branch: refs/heads/master
Commit: c97b970dc8846040040f1976811c662743e8dad3
Parents: 1c8e0dc
Author: zhaojing <zh...@comp.nus.edu.sg>
Authored: Wed Apr 6 16:31:38 2016 +0800
Committer: zhaojing <zh...@comp.nus.edu.sg>
Committed: Wed Apr 6 16:31:38 2016 +0800
----------------------------------------------------------------------
include/singa/neuralnet/neuralnet.h | 7 -------
src/neuralnet/neuralnet.cc | 6 ------
tool/python/singa/driver.i | 9 ---------
3 files changed, 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/c97b970d/include/singa/neuralnet/neuralnet.h
----------------------------------------------------------------------
diff --git a/include/singa/neuralnet/neuralnet.h b/include/singa/neuralnet/neuralnet.h
index 60887e0..33ad38c 100644
--- a/include/singa/neuralnet/neuralnet.h
+++ b/include/singa/neuralnet/neuralnet.h
@@ -58,13 +58,6 @@ class NeuralNet {
static NeuralNet* Create(const NetProto& net_conf, Phase phase,
int npartitions);
- /**
- * Create for python binding, production test mode
- *
- */
- static NeuralNet* CreateNeuralNet(const string str);
- NeuralNet() {};
-
static const NetProto Unrolling(const NetProto& net_conf);
/**
* construct the net structure from protocol buffer.
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/c97b970d/src/neuralnet/neuralnet.cc
----------------------------------------------------------------------
diff --git a/src/neuralnet/neuralnet.cc b/src/neuralnet/neuralnet.cc
index 226d8d9..b045e06 100644
--- a/src/neuralnet/neuralnet.cc
+++ b/src/neuralnet/neuralnet.cc
@@ -58,12 +58,6 @@ const NetProto NetConfPreprocess(const NetProto& conf) {
return proto;
}
-NeuralNet* NeuralNet::CreateNeuralNet(const string str) {
- NetProto net_conf;
- net_conf.ParseFromString(str);
- return NeuralNet::Create(net_conf,singa::kTest,1);
-}
-
NeuralNet* NeuralNet::Create(const NetProto& net_conf, Phase phase,
int npartitions) {
const NetProto& full_net_conf = NetConfPreprocess(net_conf);
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/c97b970d/tool/python/singa/driver.i
----------------------------------------------------------------------
diff --git a/tool/python/singa/driver.i b/tool/python/singa/driver.i
index 55cec02..63f2287 100644
--- a/tool/python/singa/driver.i
+++ b/tool/python/singa/driver.i
@@ -32,7 +32,6 @@
%{
#include "singa/driver.h"
#include "singa/worker.h"
-#include "singa/neuralnet/neuralnet.h"
#include "singa/neuralnet/layer.h"
#include "singa/neuralnet/neuron_layer.h"
#include "singa/neuralnet/loss_layer.h"
@@ -60,14 +59,6 @@ namespace singa{
void Test(const std::string job_conf);
};
- class NeuralNet{
- public:
- static NeuralNet* CreateNeuralNet(const std::string str);
- void Load(const std::vector<std::string>& paths);
- inline const std::vector<singa::Layer*>& layers();
- inline const std::vector<singa::Layer*>& srclayers(const singa::Layer* layer);
- };
-
%nodefault Worker;
class Worker{
public: