singa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wang...@apache.org
Subject svn commit: r1723512 - in /incubator/singa/site/trunk/content/markdown/docs: cnn.md mlp.md
Date Thu, 07 Jan 2016 11:06:12 GMT
Author: wangwei
Date: Thu Jan  7 11:06:12 2016
New Revision: 1723512

URL: http://svn.apache.org/viewvc?rev=1723512&view=rev
Log:
update cnn and mlp examples with GPU and Python features

Modified:
    incubator/singa/site/trunk/content/markdown/docs/cnn.md
    incubator/singa/site/trunk/content/markdown/docs/mlp.md

Modified: incubator/singa/site/trunk/content/markdown/docs/cnn.md
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/content/markdown/docs/cnn.md?rev=1723512&r1=1723511&r2=1723512&view=diff
==============================================================================
--- incubator/singa/site/trunk/content/markdown/docs/cnn.md (original)
+++ incubator/singa/site/trunk/content/markdown/docs/cnn.md Thu Jan  7 11:06:12 2016
@@ -22,6 +22,8 @@ We have provided scripts for preparing t
     $ make create
 
 
+### Training on CPU
+
 We can start the training by
 
     ./bin/singa-run.sh -conf examples/cifar10/job.conf
@@ -47,6 +49,26 @@ You should see output like
 After training some steps (depends on the setting) or the job is
 finished, SINGA will [checkpoint](checkpoint.html) the model parameters.
 
+### Training on GPU
+
+Since version 0.2, we can train CNN models on GPU using cuDNN. Please refer to
+the [GPU page](gpu.html) for details on compiling SINGA with GPU and cuDNN.
+The configuration file is similar to that for CPU training, except that the
+cuDNN layers are used and the GPU device is configured.
+
+    ./bin/singa-run.sh -conf examples/cifar10/cudnn.conf
+
+### Training using Python script
+
+The python helpers coming with SINGA 0.2 make it easy to configure a training
+job. For example the *job.conf* is replaced with a simple python script
+*mnist_mlp.py* which has about 30 lines of code following the [Keras API](http://keras.io/).
+
+      # on CPU
+    ./bin/singa-run.sh -exec tool/python/examples/cifar10_cnn.py
+      # on GPU
+    ./bin/singa-run.sh -exec tool/python/examples/cifar10_cnn_cudnn.py
+
 ## Details
 
 To train a model in SINGA, you need to prepare the datasets,

Modified: incubator/singa/site/trunk/content/markdown/docs/mlp.md
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/content/markdown/docs/mlp.md?rev=1723512&r1=1723511&r2=1723512&view=diff
==============================================================================
--- incubator/singa/site/trunk/content/markdown/docs/mlp.md (original)
+++ incubator/singa/site/trunk/content/markdown/docs/mlp.md Thu Jan  7 11:06:12 2016
@@ -21,6 +21,8 @@ We have provided scripts for preparing t
     $ make download
     $ make create
 
+### Training on CPU
+
 After the datasets are prepared, we start the training by
 
     ./bin/singa-run.sh -conf examples/mnist/job.conf
@@ -51,6 +53,24 @@ After it is started, you should see outp
 After the training of some steps (depends on the setting) or the job is
 finished, SINGA will [checkpoint](checkpoint.html) the model parameters.
 
+### Training on GPU
+
+To train this example model on GPU, just add a field in the configuration file for
+the GPU device,
+
+    # job.conf
+    gpu: 0
+
+### Training using Python script
+
+The python helpers come with SINGA 0.2 make it easy to configure the job. For example
+the job.conf is replaced with a simple python script mnist_mlp.py
+which has about 30 lines of code following the [Keras API](http://keras.io/).
+
+    ./bin/singa-run.sh -exec tool/python/examples/mnist_mlp.py
+
+
+
 ## Details
 
 To train a model in SINGA, you need to prepare the datasets,



Mime
View raw message