SINGA-225 Documentation for installation and Cifar10 example

Update docs for installation and running the cnn model against Cifar10.


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

Branch: refs/heads/dev
Commit: 95091dcb61f00faaa772e5dbb180e86242185395
Parents: 722a59e
Author: Wei Wang <[email protected]>
Authored: Fri Jul 15 22:35:22 2016 +0800
Committer: Wei Wang <[email protected]>
Committed: Fri Jul 15 22:43:22 2016 +0800

----------------------------------------------------------------------
 doc/community/issue-tracking.md    |  2 +-
 doc/community/source-repository.md | 17 +++++-----
 doc/develop/schedule.rst           |  5 ++-
 doc/docs/cnn.md                    | 46 +++++++++++----------------
 doc/docs/installation.md           | 55 ++++++++++++++++++++++++++-------
 5 files changed, 72 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/95091dcb/doc/community/issue-tracking.md
----------------------------------------------------------------------
diff --git a/doc/community/issue-tracking.md b/doc/community/issue-tracking.md
index 1dd2f59..26b23dd 100644
--- a/doc/community/issue-tracking.md
+++ b/doc/community/issue-tracking.md
@@ -2,7 +2,7 @@
 
 ___
 
-The Singa project uses [JIRA](https://www.atlassian.com/software/jira) a 
J2EE-based, issue tracking and project management application.
+SINGA uses [JIRA](https://www.atlassian.com/software/jira) a J2EE-based, issue 
tracking and project management application.
 
 Issues, bugs, and feature requests should be submitted to the following issue 
tracking system for this project.
 

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/95091dcb/doc/community/source-repository.md
----------------------------------------------------------------------
diff --git a/doc/community/source-repository.md 
b/doc/community/source-repository.md
index a8c571e..8864629 100644
--- a/doc/community/source-repository.md
+++ b/doc/community/source-repository.md
@@ -1,25 +1,22 @@
-## Source Repository
+# Source Repository
 
 ___
 
 This project uses [Git](http://git-scm.com/) to manage its source code. 
Instructions on Git use can be found at 
[http://git-scm.com/documentation](http://git-scm.com/documentation).
 
-### Web Access
+## Web Access
 
 The following is a link to the online source repository.
 
 * 
[https://git-wip-us.apache.org/repos/asf?p=incubator-singa.git;a=summary](https://git-wip-us.apache.org/repos/asf?p=incubator-singa.git;a=summary)
 
-### Anonymous Access
 
-The source can be checked out anonymously from Git with this command (See 
[http://git-scm.com/docs/git-clone](http://git-scm.com/docs/git-clone)):
+## Upstream for committers
 
-       $ git clone https://git-wip-us.apache.org/repos/asf/incubator-singa.git
+Committers need to set the upstream endpoint to the Apache git (not github) 
repo address, e.g.,
 
-### Developer Access
-
-       $ git clone https://git-wip-us.apache.org/repos/asf/incubator-singa.git
-
-The source can be checked out anonymously from Git with this command (See 
[http://git-scm.com/docs/git-clone](http://git-scm.com/docs/git-clone)):
+    $ git remote add asf 
https://git-wip-us.apache.org/repos/asf/incubator-singa.git
 
+Then you (committer) can push your code in this way,
 
+    $ git push asf <local-branch>:<remote-branch>

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/95091dcb/doc/develop/schedule.rst
----------------------------------------------------------------------
diff --git a/doc/develop/schedule.rst b/doc/develop/schedule.rst
index 4e2a826..2afe54f 100644
--- a/doc/develop/schedule.rst
+++ b/doc/develop/schedule.rst
@@ -1,7 +1,7 @@
 Development Schedule
 ====================
 
-.. csv-table:: 
+.. csv-table::
        :header: "Release", "Module", "Feature", "Status"
 
        " 0.1 Sep 2015     "," Neural Network          "," Feed forward neural 
network, including CNN, MLP                                                     
            "," done  "
@@ -29,8 +29,6 @@ Development Schedule
        "                  "," Installation            "," Remove dependency on 
ZeroMQ, CZMQ, Zookeeper for single node training","done"
        "                  "," Updater                 "," Add new SGD updaters 
including Adam, AdamMax and AdaDelta","done"
        "                  "," Binding                 "," Enhance Python 
binding for training","done"
-       "0.4 June 2016     "," Rafiki                  "," Deep learning as a 
service "," "
-       "                  ","                         "," Product search using 
Rafiki"," "
        "1.0 July 2016     "," Programming abstraction ","Tensor with linear 
algebra, neural net and random operations "," "
        "                  ","                         ","Updater for 
distributed parameter updating ",""
        "                  "," Optimization            "," Execution and memory 
optimization",""
@@ -39,3 +37,4 @@ Development Schedule
        "                  "," Cross-platform          "," To extend from Linux 
to MacOS and Windows",""
        "                  "," Examples                "," Speech recognition 
example",""
        "                  ","                         ","Large image models, 
e.g., [GoogLeNet](http://arxiv.org/abs/1409.4842), 
[VGG](https://arxiv.org/pdf/1409.1556.pdf) and [Residual 
Net](http://arxiv.org/abs/1512.03385)",""
+       "     "," Rafiki                  "," Deep learning as a service "," "

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/95091dcb/doc/docs/cnn.md
----------------------------------------------------------------------
diff --git a/doc/docs/cnn.md b/doc/docs/cnn.md
index 6566e41..21ef1f7 100755
--- a/doc/docs/cnn.md
+++ b/doc/docs/cnn.md
@@ -1,27 +1,20 @@
 #Quickstart - Cifar10 example
-Convolutional neural network (CNN) is a type of feed-forward artificial neural 
network widely used for image and video classification. In this example, we 
will use a deep CNN model to do image classification for the [CIFAR10 
dataset](http://www.cs.toronto.edu/~kriz/cifar.html).
+Convolution neural network (CNN) is a type of feed-forward artificial neural 
network widely used for image classification. In this example, we will use a 
deep CNN model to do image classification for the [CIFAR10 
dataset](http://www.cs.toronto.edu/~kriz/cifar.html).
 
-## Running instructions of CPP version
-To run CNN example in CPP version, we need to compile SINGA first. In 
SINGA_ROOT, execute the following instructions (can also refer to [Installation 
instructions](https://github.com/kaiping/singa_v1.0_doc/blob/master/installation.md))
+## Running instructions for CPP version
+Please refer to [Installation](installation.html) page for how to install 
SINGA. Currently, we CNN requires CUDNN, hence both CUDA and CUDNN should be 
installed and SINGA should be compiled with CUDA and CUDNN.
 
-    # in SINGA_ROOT
-    $ mkdir build
-    $ cd build/
-    # generate Makefile for compilation
-    $ cmake ..
-    # compile SINGA
-    $ make
-
-
-Now download the Cifar10 dataset by running the script download_data.py, 
remember that for downloading CPP version data, we need `bin` as argument,
+The Cifar10 dataset could be downloaded by running
 
     # switch to cifar10 directory
     $ cd ../examples/cifar10
     # download data for CPP version
     $ python download_data.py bin
 
+'bin' is for downloading binary version of Cifar10 data.
+
 During downloading, you should see the detailed output like
-     
+
      Downloading CIFAR10 from 
http://www.cs.toronto.edu/~kriz/cifar-10-binary.tar.gz
      The tar file does exist. Extracting it now..
      Finished!
@@ -73,20 +66,17 @@ You should see the detailed output as follows: first read 
the data files in orde
     Epoch 3, training loss = 1.213776, accuracy = 0.571620, lr = 0.001000
     Epoch 3, val loss = 1.175346, metric = 0.582000
 
-The training details are stored in `train_perf` file in the same directory and 
the validation details in `val_perf` file. 
-## Running instructions of Python version
-To run CNN example in Python version, we also need to compile SINGA first. In 
SINGA_ROOT, execute the following instructions (can also refer to [Installation 
instructions](https://github.com/kaiping/singa_v1.0_doc/blob/master/installation.md))
+The training details are stored in `train_perf` file in the same directory and 
the validation details in `val_perf` file.
 
-    # in SINGA_ROOT
-    $ mkdir build
-    $ cd build/
-    # generate Makefile for compilation
-    $ cmake ..
-    # compile SINGA
-    $ make
 
+## Running instructions for Python version
+To run CNN example in Python version, we need to compile SINGA with Python 
binding,
+
+    $ mkdir build && cd build
+    $ cmake -DUSE_PYTHON=ON ..
+    $ make
 
-Now download the Cifar10 dataset by running the script download_data.py, 
remember that for downloading Python version data, we need `py` as argument,
+Now download the Cifar10 dataset,
 
     # switch to cifar10 directory
     $ cd ../examples/cifar10
@@ -94,7 +84,7 @@ Now download the Cifar10 dataset by running the script 
download_data.py, remembe
     $ python download_data.py py
 
 During downloading, you should see the detailed output like
-     
+
      Downloading CIFAR10 from 
http://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz
      The tar file does exist. Extracting it now..
      Finished!
@@ -103,7 +93,7 @@ Then execute the `train.py` script to build the model
 
     $ python train.py
 
-You should see the output as follows including the details of neural net 
structure with some parameter information, reading data files, and the 
performance details during training and testing process. 
+You should see the output as follows including the details of neural net 
structure with some parameter information, reading data files, and the 
performance details during training and testing process.
 
     (32L, 32L, 32L)
     (32L, 16L, 16L)
@@ -148,4 +138,4 @@ You should see the output as follows including the details 
of neural net structu
 
 This script will call `alexnet.py` file to build the alexnet model. After the 
training is finished, SINGA will save the model parameters into a checkpoint 
file `model.bin` in the same directory. Then we can use this `model.bin` file 
for prediction.
 
-    $ python predict.py
\ No newline at end of file
+    $ python predict.py

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/95091dcb/doc/docs/installation.md
----------------------------------------------------------------------
diff --git a/doc/docs/installation.md b/doc/docs/installation.md
index 6d80774..4aecb73 100755
--- a/doc/docs/installation.md
+++ b/doc/docs/installation.md
@@ -1,29 +1,62 @@
 #Building SINGA from source
-To install SINGA, please clone the newest code from 
[Github](https://github.com/apache/incubator-singa) and execute the following 
commands,
 
-    
+## Dependencies
+
+### Required
+* Google Protobuf (>=2.5)
+* BLAS (tested with OpenBLAS >=0.2.10)
+* CUDA (tested with 6.5, 7.0 and 7.5)
+* CUDNN (v4 and v5)
+
+Uses must install the above mandatory libraries.
+Currently CUDA and CUNN are also mandatory, but it would become optional later.
+
+### Optional
+* Glog
+* OpenCV (tested with 2.4.8)
+* LMDB (tested with 0.9)
+
+
+## Instructions
+
+Please clone the newest code from 
[Github](https://github.com/apache/incubator-singa) and execute the following 
commands,
+
+
     $ git clone https://github.com/apache/incubator-singa.git
     $ cd incubator-singa/
     # switch to dev branch
     $ git checkout dev
-  
-A SINGA uses CNMem as a submodule in lib/, execute the following commands to 
initialize and update the submodules for SINGA, 
+
+
+If you use CUDA, then [CNMeM](https://github.com/NVIDIA/cnmem) is necessary,
+which could be downloaded as
 
     $ git submodule init
     $ git submodule update
 
+
+### Linux OS
+
 Then in SINGA_ROOT, execute the following commands for compiling SINGA,
 
-    $ mkdir build
-    $ cd build/
+    $ mkdir build && cd build
     # generate Makefile for compilation
     $ cmake ..
     # compile SINGA
     $ make
 
-After compiling SINGA, in order to test all components of SINGA, please 
execute the following commands,
-    
-    $ cd bin/
-    $ ./test_singa
+You can use `ccmake ..` to configure the compilation options including using
+LMDB, GLOG, etc.
+
+After compiling SINGA, you can run the unit tests by
+
+    $ ./bin/test_singa
+
+You can see all the testing cases with testing results. If SINGA passes all
+tests, then you have successfully installed SINGA. Please proceed to enjoy 
SINGA!
+
+
+### MacOS
+
 
-You can see all the testing cases with testing results. If SINGA has passes 
all tests, then you have successfully installed SINGA. Please proceed to enjoy 
SINGA!
\ No newline at end of file
+### Windows

Reply via email to