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/07/24 14:14:09 UTC

[2/3] incubator-singa git commit: SINGA-9 Add Support for Restricted Boltzman Machine (RBM) model

SINGA-9 Add Support for Restricted Boltzman Machine (RBM) model

update rbm_job.conf by increating test frequency
remove visualization_frequency in ModelProto


Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/1b03a9bd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/1b03a9bd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/1b03a9bd

Branch: refs/heads/master
Commit: 1b03a9bdec2c8191ebbe9af5631f585615ee58b9
Parents: 4afa468
Author: Wei Wang <wa...@comp.nus.edu.sg>
Authored: Fri Jul 24 20:09:11 2015 +0800
Committer: Wei Wang <wa...@comp.nus.edu.sg>
Committed: Fri Jul 24 20:09:11 2015 +0800

----------------------------------------------------------------------
 examples/mnist/rbm_job.conf | 127 +++++++++++++++++++--------------------
 src/proto/job.proto         |   2 -
 2 files changed, 61 insertions(+), 68 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/1b03a9bd/examples/mnist/rbm_job.conf
----------------------------------------------------------------------
diff --git a/examples/mnist/rbm_job.conf b/examples/mnist/rbm_job.conf
index 3dcbbc9..e40d02d 100644
--- a/examples/mnist/rbm_job.conf
+++ b/examples/mnist/rbm_job.conf
@@ -9,91 +9,86 @@ model {
   name: "deep-big-simple-dbm"
   train_steps: 46000
   test_steps:1
-  test_frequency:100
+  test_frequency:1000
   display_frequency: 100
-  debug: true
   alg: kContrastiveDivergence
   pcd_k: 15
-  visualization_frequency: 5000
   updater{
     base_lr: 0.1
     lr_change: kFixed
     type: kSGD
-#   param_type: "Param"
   }
 
-
-neuralnet {
-layer {
-  name: "data"
-  type: kShardData
-  sharddata_conf {
-    path: "examples/mnist/mnist_train_shard"
-    batchsize: 20
+  neuralnet {
+  layer {
+    name: "data"
+    type: kShardData
+    sharddata_conf {
+      path: "examples/mnist/mnist_train_shard"
+      batchsize: 20
+    }
+    exclude: kTest
   }
-  exclude: kTest
-}
 
 
-layer {
-  name: "data"
-  type: kShardData
-  sharddata_conf {
-    path: "examples/mnist/mnist_test_shard"
-    batchsize: 20
+  layer {
+    name: "data"
+    type: kShardData
+    sharddata_conf {
+      path: "examples/mnist/mnist_test_shard"
+      batchsize: 20
+    }
+    exclude: kTrain
   }
-  exclude: kTrain
-}
 
 
-layer{
-  name:"mnist"
-  type: kMnist
-  srclayers: "data"
-  mnist_conf {
-    norm_a: 255
-    norm_b: 0
+  layer{
+    name:"mnist"
+    type: kMnist
+    srclayers: "data"
+    mnist_conf {
+      norm_a: 255
+      norm_b: 0
+    }
   }
-}
 
-layer{
-  name: "RBMVis"
-  type: kRBMVis
-  srclayers:"mnist"
-  srclayers:"RBMHid"
-  rbmvis_conf{
-    num_output: 500
-  }
-  param{
-    name: "w1"
-    init_method: kUniformSqrtFanInOut
-    low:-9.79
-    high:9.79
+  layer{
+    name: "RBMVis"
+    type: kRBMVis
+    srclayers:"mnist"
+    srclayers:"RBMHid"
+    rbmvis_conf{
+      num_output: 500
+    }
+    param{
+      name: "w1"
+      init_method: kUniformSqrtFanInOut
+      low:-9.79
+      high:9.79
+    }
+    param{
+      name: "b1"
+      init_method: kConstant
+      value: 0.0
+    }
   }
-  param{
-    name: "b1"
-    init_method: kConstant
-    value: 0.0
-  }
-}
 
-layer{
-  name: "RBMHid"
-  type: kRBMHid
-  srclayers:"RBMVis"
-  rbmhid_conf{
-    hid_dim: 500
-  }
-  param{
-    name: "w2"
-#   init_method: kUniformSqrtFanInOut
-    share_from: "w1"
+  layer{
+    name: "RBMHid"
+    type: kRBMHid
+    srclayers:"RBMVis"
+    rbmhid_conf{
+      hid_dim: 500
+    }
+    param{
+      name: "w2"
+      share_from: "w1"
+    }
+    param{
+      name: "b2"
+      init_method: kConstant
+      value: 0.0
+    }
   }
-  param{
-    name: "b2"
-    init_method: kConstant
-    value: 0.0
   }
 }
-}
-}

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/1b03a9bd/src/proto/job.proto
----------------------------------------------------------------------
diff --git a/src/proto/job.proto b/src/proto/job.proto
index 068867c..025f256 100644
--- a/src/proto/job.proto
+++ b/src/proto/job.proto
@@ -75,8 +75,6 @@ message ModelProto {
   optional int32 test_frequency = 33 [default = 0];
   // frequency of checkpoint
   optional int32 checkpoint_frequency = 34 [default = 0];
-  //frequency of visualization
-  optional int32 visualization_frequency = 37 [default=5000];
   // send parameters to servers after training for this num of steps
   optional int32 warmup_steps = 35 [default = 0];
   // checkpoint path