singa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r977960 [2/3] - in /websites/staging/singa/trunk/content: ./ docs/zh/
Date Mon, 18 Jan 2016 07:44:36 GMT
Added: websites/staging/singa/trunk/content/docs/zh/installation_source.html
==============================================================================
--- websites/staging/singa/trunk/content/docs/zh/installation_source.html (added)
+++ websites/staging/singa/trunk/content/docs/zh/installation_source.html Mon Jan 18 07:44:36 2016
@@ -0,0 +1,608 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-01-18 
+ | Rendered using Apache Maven Fluido Skin 1.4
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160118" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache SINGA &#x2013; 从源程序安装SIGNA</title>
+    <link rel="stylesheet" href="../../css/apache-maven-fluido-1.4.min.css" />
+    <link rel="stylesheet" href="../../css/site.css" />
+    <link rel="stylesheet" href="../../css/print.css" media="print" />
+
+      
+    
+    
+  
+    <script type="text/javascript" src="../../js/apache-maven-fluido-1.4.min.js"></script>
+
+                          
+        
+<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
+                      
+        
+<script type="text/x-mathjax-config">MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});</script>
+                      
+        
+<meta content="Apache SINGA" name="author"/>
+                      
+        
+<meta content="SINGA, Deep Learning, Distributed training" name="keywords"/>
+          
+                  </head>
+        <body class="topBarEnabled">
+          
+    
+    
+            
+    
+        
+    <a href="https://github.com/apache/incubator-singa">
+      <img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;"
+        src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png"
+        alt="Fork me on GitHub">
+    </a>
+  
+                
+                    
+                
+
+    <div id="topbar" class="navbar navbar-fixed-top navbar-inverse">
+      <div class="navbar-inner">
+                <div class="container-fluid">
+        <a data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar">
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+        </a>
+                
+                                <ul class="nav">
+                          <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Apache SINGA <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../../docs/overview.html"  title="Introduction">Introduction</a>
+</li>
+                  
+                      <li>      <a href="../../docs/quick-start.html"  title="Quick Start">Quick Start</a>
+</li>
+                  
+                      <li>      <a href="../../downloads.html"  title="Downloads">Downloads</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Documentaion <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li class="dropdown-submenu">
+                                      <a href="../../docs/index.html"  title="v0.2.0">v0.2.0</a>
+              <ul class="dropdown-menu">
+                                  <li>      <a href="../../docs/index.html"  title="English">English</a>
+</li>
+                                  <li>      <a href="../../docs/zh/index.html"  title="中文">中文</a>
+</li>
+                                  <li>      <a href="../../docs/jp/index.html"  title="日本語">日本語</a>
+</li>
+                                  <li>      <a href="../../docs/kr/index.html"  title="한국어">한국어</a>
+</li>
+                              </ul>
+            </li>
+                  
+                      <li>      <a href="../../v0.1.0/index.html"  title="v0.1.0">v0.1.0</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Development <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../../develop/schedule.html"  title="Schedule">Schedule</a>
+</li>
+                  
+                      <li class="dropdown-submenu">
+                                      <a href="../../develop/how-contribute.html"  title="How to Contribute">How to Contribute</a>
+              <ul class="dropdown-menu">
+                                  <li>      <a href="../../develop/contribute-code.html"  title="Code">Code</a>
+</li>
+                                  <li>      <a href="../../develop/contribute-docs.html"  title="Documentation">Documentation</a>
+</li>
+                              </ul>
+            </li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Community <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../../community/source-repository.html"  title="Source Repository">Source Repository</a>
+</li>
+                  
+                      <li>      <a href="../../community/mail-lists.html"  title="Mailing Lists">Mailing Lists</a>
+</li>
+                  
+                      <li>      <a href="../../community/issue-tracking.html"  title="Issue Tracking">Issue Tracking</a>
+</li>
+                  
+                      <li>      <a href="../../community/team-list.html"  title="SINGA Team">SINGA Team</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">External Links <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="http://www.apache.org/"  title="Apache Software Foundation">Apache Software Foundation</a>
+</li>
+                  
+                      <li>      <a href="http://www.comp.nus.edu.sg/~dbsystem/singa/"  title="NUS Site">NUS Site</a>
+</li>
+                          </ul>
+      </li>
+                  </ul>
+          
+          
+          
+                   
+                      </div>
+          
+        </div>
+      </div>
+    </div>
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                                  <a href="../../index.html" id="bannerLeft" title="Apache SINGA">
+                                                                                                <img src="../../images/singa-logo.png"  alt="Apache SINGA"/>
+                </a>
+                      </div>
+        <div class="pull-right">              <div id="bannerRight">
+                                                                                                <img src="../../images/singa-title.png"  alt="Apache SINGA"/>
+                </div>
+      </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                              <li class="">
+                    <a href="../../index.html" title="Apache SINGA">
+        Apache SINGA</a>
+                    <span class="divider">/</span>
+      </li>
+        <li class="active ">从源程序安装SIGNA</li>
+        
+                
+                    
+      
+                            </ul>
+      </div>
+
+                  
+      <div class="row-fluid">
+        <div id="leftColumn" class="span2">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Apache SINGA</li>
+                              
+      <li>
+  
+                          <a href="../../docs/overview.html" title="Introduction">
+          <span class="none"></span>
+        Introduction</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../../docs/quick-start.html" title="Quick Start">
+          <span class="none"></span>
+        Quick Start</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../../downloads.html" title="Downloads">
+          <span class="none"></span>
+        Downloads</a>
+            </li>
+                              <li class="nav-header">Documentaion</li>
+                                                                                                                                      
+      <li>
+  
+                          <a href="../../docs/index.html" title="v0.2.0">
+          <span class="icon-chevron-right"></span>
+        v0.2.0</a>
+                  </li>
+                
+      <li>
+  
+                          <a href="../../v0.1.0/index.html" title="v0.1.0">
+          <span class="none"></span>
+        v0.1.0</a>
+            </li>
+                              <li class="nav-header">Development</li>
+                              
+      <li>
+  
+                          <a href="../../develop/schedule.html" title="Schedule">
+          <span class="none"></span>
+        Schedule</a>
+            </li>
+                                                                                    
+      <li>
+  
+                          <a href="../../develop/how-contribute.html" title="How to Contribute">
+          <span class="icon-chevron-right"></span>
+        How to Contribute</a>
+                  </li>
+                              <li class="nav-header">Community</li>
+                              
+      <li>
+  
+                          <a href="../../community/source-repository.html" title="Source Repository">
+          <span class="none"></span>
+        Source Repository</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../../community/mail-lists.html" title="Mailing Lists">
+          <span class="none"></span>
+        Mailing Lists</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../../community/issue-tracking.html" title="Issue Tracking">
+          <span class="none"></span>
+        Issue Tracking</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../../community/team-list.html" title="SINGA Team">
+          <span class="none"></span>
+        SINGA Team</a>
+            </li>
+                              <li class="nav-header">External Links</li>
+                              
+      <li>
+  
+                          <a href="http://www.apache.org/" class="externalLink" title="Apache Software Foundation">
+          <span class="none"></span>
+        Apache Software Foundation</a>
+            </li>
+                
+      <li>
+  
+                          <a href="http://www.comp.nus.edu.sg/~dbsystem/singa/" class="externalLink" title="NUS Site">
+          <span class="none"></span>
+        NUS Site</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                   <a href="http://incubator.apache.org" title="apache-incubator" class="builtBy">
+        <img class="builtBy"  alt="Apache Incubator" src="http://incubator.apache.org/images/egg-logo.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                        
+        <div id="bodyColumn"  class="span10" >
+                                  
+            <h1>&#x4ece;&#x6e90;&#x7a0b;&#x5e8f;&#x5b89;&#x88c5;SIGNA</h1>
+<hr />
+<div class="section">
+<h2><a name="a"></a>&#x4f9d;&#x8d56;</h2>
+<p>SINGA &#x5728;Linux&#x5e73;&#x53f0;&#x4e0a;&#x5f00;&#x53d1;&#x4e0e;&#x6d4b;&#x8bd5;&#x3002;&#x5b89;&#x88c5;SINGA&#x9700;&#x8981;&#x4e0b;&#x62c9;&#x5217;&#x4f9d;&#x8d56;&#x5e93;&#xff1a;</p>
+
+<ul>
+  
+<li>
+<p>glog version 0.3.3</p></li>
+  
+<li>
+<p>google-protobuf version 2.6.0</p></li>
+  
+<li>
+<p>openblas version &gt;= 0.2.10</p></li>
+  
+<li>
+<p>zeromq version &gt;= 3.2</p></li>
+  
+<li>
+<p>czmq version &gt;= 3</p></li>
+  
+<li>
+<p>zookeeper version 3.4.6</p></li>
+</ul>
+<p>&#x53ef;&#x9009;&#x4f9d;&#x8d56;&#x5305;&#x62ec;&#xff1a;</p>
+
+<ul>
+  
+<li>lmdb version 0.9.10</li>
+</ul>
+<p>&#x4f60;&#x53ef;&#x4ee5;&#x4f7f;&#x7528;&#x4e0b;&#x5217;&#x547d;&#x4ee4;&#x5c06;&#x6240;&#x6709;&#x7684;&#x4f9d;&#x8d56;&#x5e93;&#x5b89;&#x88c5;&#x5230;$PREFIX&#x6587;&#x4ef6;&#x5939;&#x4e0b;&#xff1a;</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint"># make sure you are in the thirdparty folder
+cd thirdparty
+./install.sh all $PREFIX
+</pre></div></div>
+<p>&#x5982;&#x679c;$PREFIX&#x4e0d;&#x662f;&#x4e00;&#x4e2a;&#x7cfb;&#x7edf;&#x8def;&#x5f84;&#xff08;&#x5982;&#xff1a;/esr/local/&#xff09;&#xff0c;&#x8bf7;&#x5728;&#x7ee7;&#x7eed;&#x5b89;&#x88c5;&#x524d;&#x4f7f;&#x7528;&#x4e0b;&#x8ff0;&#x547d;&#x4ee4;&#x5bfc;&#x51fa;&#x76f8;&#x5173;&#x53d8;&#x91cf;&#xff1a;</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">export LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH
+export CPLUS_INCLUDE_PATH=$PREFIX/include:$CPLUS_INCLUDE_PATH
+export LIBRARY_PATH=$PREFIX/lib:$LIBRARY_PATH
+export PATH=$PREFIX/bin:$PATH
+</pre></div></div>
+<p>&#x5173;&#x4e8e;&#x4f7f;&#x7528;&#x8fd9;&#x4e2a;&#x811a;&#x672c;&#x7684;&#x7ec6;&#x8282;&#x540e;&#x6587;&#x4f1a;&#x8be6;&#x7ec6;&#x4ecb;&#x7ecd;&#x3002;</p></div>
+<div class="section">
+<h2><a name="aSINGA"></a>&#x4ece;&#x6e90;&#x7a0b;&#x5e8f;&#x5b89;&#x88c5;SINGA</h2>
+<p>SINGA &#x4f7f;&#x7528; GNU autotools &#x6784;&#x5efa;&#xff0c;&#x9700;&#x8981;GCC (version &gt;= 4.8)&#x3002; &#x6709;&#x4e24;&#x79cd;&#x65b9;&#x5f0f;&#x5b89;&#x88c5;SINGA&#x3002;</p>
+
+<ul>
+  
+<li>
+<p>&#x5982;&#x679c;&#x4f60;&#x60f3;&#x4f7f;&#x7528;&#x6700;&#x8fd1;&#x7684;&#x4ee3;&#x7801;&#xff0c;&#x8bf7;&#x6267;&#x884c;&#x4ee5;&#x4e0b;&#x547d;&#x4ee4;&#x4ece; <a class="externalLink" href="https://github.com/apache/incubator-singa.git">Github</a> &#x4e0a;&#x514b;&#x9686;&#xff1a;</p>
+  
+<div class="source">
+<div class="source"><pre class="prettyprint">$ git clone git@github.com:apache/incubator-singa.git
+$ cd incubator-singa
+$ ./autogen.sh
+$ ./configure
+$ make
+</pre></div></div></li>
+</ul>
+<p>&#x6ce8;&#x610f;: &#x7531;&#x4e8e;&#x6211;&#x4eec;&#x7684;&#x758f;&#x5ffd;&#xff0c;&#x5728;&#x52a0;&#x5165;Apache Incubator&#x9879;&#x76ee;&#x540e;&#xff0c;<a class="externalLink" href="https://github.com/orgs/nusinga">nusinga</a> &#x5e10;&#x53f7;&#x4e0b;&#x7684;SINGA&#x5e93;&#xff08;repo&#xff09;&#x5e76;&#x6ca1;&#x6709;&#x5220;&#x9664;&#xff0c;&#x4f46;&#x5b83;&#x65e9;&#x5df2;&#x6ca1;&#x6709;&#x66f4;&#x65b0;&#xff0c;&#x5f88;&#x62b1;&#x6b49;&#x7ed9;&#x5927;&#x5bb6;&#x5e26;&#x6765;&#x7684;&#x4e0d;&#x4fbf;&#x3002;</p>
+
+<ul>
+  
+<li>
+<p>&#x5982;&#x679c;&#x4f60;&#x4e0b;&#x8f7d;&#x4e86;&#x53d1;&#x5e03;&#x5305;&#xff0c;&#x8bf7;&#x6309;&#x4ee5;&#x4e0b;&#x547d;&#x4ee4;&#x5b89;&#x88c5;&#xff1a;</p>
+  
+<div class="source">
+<div class="source"><pre class="prettyprint">$ tar xvf singa-xxx
+$ cd singa-xxx
+$ ./configure
+$ make
+</pre></div></div>
+<p>SINGA&#x7684;&#x90e8;&#x5206;&#x7279;&#x6027;&#x4f9d;&#x8d56;&#x4e8e;&#x5916;&#x90e8;&#x5e93;&#xff0c;&#x8fd9;&#x4e9b;&#x7279;&#x6027;&#x53ef;&#x4ee5;&#x4f7f;&#x7528;<tt>--enable-&lt;feature&gt;</tt>&#x7f16;&#x8bd1;&#x3002; &#x6bd4;&#x5982;&#xff0c;&#x6309;&#x51c6;&#x8ddf;&#x652f;&#x6301;lmdb&#x7684;SINGA&#xff0c;&#x53ef;&#x4ee5;&#x8fd0;&#x884c;&#x4e0b;&#x9762;&#x7684;&#x547d;&#x4ee4;&#xff1a;</p>
+  
+<div class="source">
+<div class="source"><pre class="prettyprint">$ ./configure --enable-lmdb
+</pre></div></div></li>
+</ul>
+<!-- -
+Zhongle: please update the code to use the follow command
+
+    $ make test
+
+After compilation, you will find the binary file singatest. Just run it!
+More details about configure script can be found by running:
+
+		$ ./configure -h -->
+<p>SINGA&#x7f16;&#x8bd1;&#x6210;&#x529f;&#x540e;&#xff0c; <i>libsinga.so</i> &#x548c;&#x53ef;&#x6267;&#x884c;&#x6587;&#x4ef6; <i>singa</i> &#x4f1a;&#x751f;&#x6210;&#x5728; <i>.libs/</i> &#x6587;&#x4ef6;&#x5939;&#x4e0b;&#x3002;</p>
+<p>&#x5982;&#x679c;&#x7f3a;&#x5931;&#xff08;&#x6216;&#x6ca1;&#x6709;&#x68c0;&#x6d4b;&#x5230;&#xff09;&#x67d0;&#x4e9b;&#x4f9d;&#x8d56;&#x5e93;&#xff0c;&#x53ef;&#x4f7f;&#x7528;&#x4e0b;&#x9762;&#x7684;&#x811a;&#x672c;&#x4e0b;&#x8f7d;&#x548c;&#x5b89;&#x88c5;&#xff1a;</p>
+<!-- -
+to be updated after zhongle changes the code to use
+
+    ./install.sh libname \-\-prefix= -->
+
+<div class="source">
+<div class="source"><pre class="prettyprint"># must goto thirdparty folder
+$ cd thirdparty
+$ ./install.sh LIB_NAME PREFIX
+</pre></div></div>
+<p>&#x5982;&#x679c;&#x6ca1;&#x6709;&#x6307;&#x5b9a;&#x5b89;&#x88c5;&#x8def;&#x5f84;&#xff0c;&#x8fd9;&#x4e9b;&#x5e93;&#x4f1a;&#x88ab;&#x5b89;&#x88c5;&#x5728;&#x8fd9;&#x4e9b;&#x8f6f;&#x4ef6;&#x9ed8;&#x8ba4;&#x7684;&#x5b89;&#x88c5;&#x8def;&#x5f84;&#x4e0b;&#x3002;&#x6bd4;&#x5982;&#xff0c;&#x5982;&#x679c;&#x60f3;&#x5728;&#x9ed8;&#x8ba4;&#x7cfb;&#x7edf;&#x6587;&#x4ef6;&#x5939;&#x4e0b;&#x5b89;&#x88c5;<tt>zeromq</tt>&#xff0c;&#x8bf7;&#x6267;&#x884c;&#x4ee5;&#x4e0b;&#x547d;&#x4ee4;&#xff1a;</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">$ ./install.sh zeromq
+</pre></div></div>
+<p>&#x6216;&#x8005;&#xff0c;&#x5982;&#x679c;&#x60f3;&#x5b89;&#x88c5;&#x5230;&#x5176;&#x4ed6;&#x76ee;&#x5f55;&#xff1a;</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">$ ./install.sh zeromq PREFIX
+</pre></div></div>
+<p>&#x4e5f;&#x53ef;&#x4ee5;&#x5c06;&#x6240;&#x6709;&#x7684;&#x4f9d;&#x8d56;&#x5e93;&#x5b89;&#x88c5;&#x5230; <i>/usr/local</i> &#x76ee;&#x5f55;:</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">$ ./install.sh all /usr/local
+</pre></div></div>
+<p>&#x4e0b;&#x8868;&#x5c55;&#x793a;&#x4e86;&#x5404;&#x4f9d;&#x8d56;&#x5e93;&#x7684;&#x7b2c;&#x4e00;&#x4e2a;&#x53c2;&#x6570;&#xff1a;</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">LIB_NAME  LIBRARIE
+czmq*                 czmq lib
+glog                  glog lib
+lmdb                  lmdb lib
+OpenBLAS              OpenBLAS lib
+protobuf              Google protobuf
+zeromq                zeromq lib
+zookeeper             Apache zookeeper
+</pre></div></div>
+<p>*: &#x56e0;&#x4e3a; <tt>czmq</tt> &#x4f9d;&#x8d56;&#x4e8e; <tt>zeromq</tt>&#xff0c;&#x4e0b;&#x8ff0;&#x811a;&#x672c;&#x591a;&#x63d0;&#x4f9b;&#x4e00;&#x4e2a;&#x53c2;&#x6570;&#xff0c;&#x8bf4;&#x660e; <tt>zeromq</tt> &#x7684;&#x4f4d;&#x7f6e;&#x3002; <tt>czmq</tt> &#x7684;&#x5b89;&#x88c5;&#x547d;&#x4ee4;&#x662f;&#xff1a;</p>
+<!-- -
+to be updated to
+
+    $./install.sh czmq  \-\-prefix=/usr/local \-\-zeromq=/usr/local/zeromq -->
+
+<div class="source">
+<div class="source"><pre class="prettyprint">$./install.sh czmq  /usr/local -f=/usr/local/zeromq
+</pre></div></div>
+<p>&#x6267;&#x884c;&#x540e;&#xff0c;<tt>czmq</tt> &#x4f1a;&#x88ab;&#x5b89;&#x88c5;&#x5728; <i>/usr/local</i>&#xff0c;&#x4e0a;&#x8ff0;&#x6700;&#x540e;&#x4e00;&#x4e2a;&#x8def;&#x5f84;&#x6307;&#x660e;&#x4e86; zeromq &#x7684;&#x8def;&#x5f84;&#x3002;</p>
+<div class="section">
+<h3><a name="a"></a>&#x5e38;&#x89c1;&#x95ee;&#x9898;</h3>
+
+<ul>
+  
+<li>Q1: &#x5373;&#x4f7f;&#x5b89;&#x88c5;&#x4e86; OpenBLAS&#xff0c;&#x4ecd;&#x9047;&#x89c1; <tt>./configure --&gt; cannot find blas_segmm() function</tt> &#x9519;&#x8bef;&#x3002;</li>
+</ul>
+<p>A1: &#x8be5;&#x9519;&#x8bef;&#x662f;&#x6307;&#x7f16;&#x8bd1;&#x5668;&#x627e;&#x4e0d;&#x7740;<tt>OpenBLAS</tt>&#xff0c;&#x5982;&#x679c;&#x4f60;&#x5b89;&#x88c5;&#x5728; $PREFIX (&#x5982;, /opt/OpenBLAS)&#xff0c;&#x4f60;&#x9700;&#x8981;&#x5c06;&#x8def;&#x5f84;&#x5bfc;&#x51fa;&#xff0c;&#x5982;&#x4e0b;&#x6240;&#x793a;</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">  $ export LIBRARY_PATH=$PREFIX/lib:$LIBRARY_PATH
+  # e.g.,
+  $ export LIBRARY_PATH=/opt/OpenBLAS/lib:$LIBRARY_PATH
+</pre></div></div>
+
+<ul>
+  
+<li>Q2: &#x78b0;&#x89c1;&#x9519;&#x8bef;<tt>cblas.h no such file or directory exists</tt>&#x3002;</li>
+</ul>
+<p>Q2: &#x4f60;&#x9700;&#x8981;&#x5c06; cblas.h &#x6240;&#x5728;&#x6587;&#x4ef6;&#x5939;&#x5305;&#x542b;&#x5230; CPLUS_INCLUDE_PATH &#x4e2d;&#xff0c;&#x5982;&#xff1a;</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">  $ export CPLUS_INCLUDE_PATH=$PREFIX/include:$CPLUS_INCLUDE_PATH
+  # e.g.,
+  $ export CPLUS_INCLUDE_PATH=/opt/OpenBLAS/include:$CPLUS_INCLUDE_PATH
+  # then reconfigure and make SINGA
+  $ ./configure
+  $ make
+</pre></div></div>
+
+<ul>
+  
+<li>Q3: &#x7f16;&#x8bd1;SINGA&#x65f6;&#xff0c;&#x78b0;&#x89c1;&#x9519;&#x8bef;<tt>SSE2 instruction set not enabled</tt>&#x3002;</li>
+</ul>
+<p>A3: &#x4f60;&#x53ef;&#x4ee5;&#x5c1d;&#x8bd5;&#x4ee5;&#x4e0b;&#x547d;&#x4ee4;:</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">  $ make CFLAGS='-msse2' CXXFLAGS='-msse2'
+</pre></div></div>
+
+<ul>
+  
+<li>Q4: &#x5f53;&#x6211;&#x8bd5;&#x7740;import .py&#x6587;&#x4ef6;&#x65f6;&#xff0c;&#x4ece;google.protobuf.internal &#x5f97;&#x5230;&#x9519;&#x8bef;<tt>ImportError: cannot import name enum_type_wrapper</tt>&#x3002;</li>
+</ul>
+<p>A4: &#x901a;&#x8fc7; <tt>make install</tt> &#x5b89;&#x88c5;google protobuf&#x540e;, &#x6211;&#x4eec;&#x5e94;&#x8be5;&#x5b89;&#x88c5;python&#x8fd0;&#x884c;&#x65f6;&#x5e93;&#x3002;&#x5728;protobuf&#x6e90;&#x6587;&#x4ef6;&#x5939;&#x4e0b;&#x8fd0;&#x884c;&#xff1a;</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">  $ cd /PROTOBUF/SOURCE/FOLDER
+  $ cd python
+  $ python setup.py build
+  $ python setup.py install
+</pre></div></div>
+<p>&#x5982;&#x679c;&#x4f60;&#x8981;&#x5728;&#x7cfb;&#x7edf;&#x6587;&#x4ef6;&#x5939;&#x4e2d;&#x5b89;&#x88c5;python&#x7684;&#x8fd0;&#x884c;&#x65f6;&#x5e93;&#xff0c;&#x53ef;&#x80fd;&#x8981;&#x7528;<tt>sudo</tt>&#x3002;</p>
+
+<ul>
+  
+<li>Q5: &#x9047;&#x89c1;&#x7531;gflags&#x5bfc;&#x81f4;&#x7684;&#x94fe;&#x63a5;&#x9519;&#x8bef;&#x3002;</li>
+</ul>
+<p>A5: SINGA&#x4e0d;&#x4f9d;&#x8d56;gflags&#xff0c;&#x4f46;&#x4f60;&#x53ef;&#x80fd;&#x5728;&#x5b89;&#x88c5;glog&#x65f6;&#x5b89;&#x88c5;&#x4e86;gflags&#x3002;&#x8fd9;&#x79cd;&#x60c5;&#x51b5;&#x4e0b;&#x4f60;&#x9700;&#x8981;&#x7528; <i>thirdparty/install.sh</i> &#x91cd;&#x65b0;&#x5c06;glog&#x5b89;&#x88c5;&#x5230;&#x53e6;&#x4e00;&#x6587;&#x4ef6;&#x5939;&#xff0c;&#x5e76;&#x5c06;&#x8be5;&#x6587;&#x4ef6;&#x5939;&#x8def;&#x5f84;&#x5bfc;&#x51fa;&#x5230;LDFLAGS &#x548c; CPPFLAGS &#x4e2d;&#x3002;</p>
+
+<ul>
+  
+<li>Q6: &#x5728;mac OS X&#x4e0a;&#x7f16;&#x8bd1;SINGA&#x548c;&#x5b89;&#x88c5; <tt>glog</tt> &#x65f6;&#xff0c;&#x9047;&#x5230;&#x4e86;&#x81f4;&#x547d;&#x9519;&#x8bef; <tt>'ext/slist' file not found</tt></li>
+</ul>
+<p>A6: &#x8bf7;&#x5355;&#x72ec;&#x5b89;&#x88c5;<tt>glog</tt>&#xff0c;&#x518d;&#x5c1d;&#x8bd5;&#x4ee5;&#x4e0b;&#x547d;&#x4ee4;:</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">  $ make CFLAGS='-stdlib=libstdc++' CXXFLAGS='stdlib=libstdc++'
+</pre></div></div>
+
+<ul>
+  
+<li>Q7: &#x5f53;&#x6211;&#x542f;&#x52a8;&#x4e00;&#x4e2a;&#x8bad;&#x7ec3;&#x4f5c;&#x4e1a;&#x65f6;&#xff0c;&#x7a0b;&#x5e8f;&#x62a5;&#x9519;&#x4e3a; &#x201c;ZOO_ERROR&#x2026;zk retcode=-4&#x2026;&#x201d;&#x3002;</li>
+</ul>
+<p>A7: &#x8fd9;&#x662f;&#x56e0;&#x4e3a; zookeeper &#x6ca1;&#x6709;&#x542f;&#x52a8;&#xff0c;&#x8bf7;&#x542f;&#x52a8; zookeeper &#x670d;&#x52a1;&#x3002;</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">  $ ./bin/zk-service start
+</pre></div></div>
+<p>&#x5982;&#x679c;&#x4ecd;&#x6709;&#x8fd9;&#x4e2a;&#x9519;&#x8bef;&#xff0c;&#x53ef;&#x80fd;&#x662f;&#x6ca1;&#x6709;java&#xff0c;&#x4f60;&#x53ef;&#x4ee5;&#x7528;&#x4e0b;&#x8ff0;&#x547d;&#x4ee4;&#x67e5;&#x770b;</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">  $ java --version
+</pre></div></div>
+
+<ul>
+  
+<li>Q8: &#x5f53;&#x6211;&#x4ece;&#x6e90;&#x6587;&#x4ef6;&#x5b89;&#x88c5; OpenBLAS &#x65f6;&#xff0c;&#x88ab;&#x544a;&#x77e5;&#x9700;&#x8981;&#x4e00;&#x4e2a; fortran &#x7f16;&#x8bd1;&#x5668;&#x3002;</li>
+</ul>
+<p>A8: &#x6309;&#x5982;&#x4e0b;&#x547d;&#x4ee4;&#x7f16;&#x8bd1; OpenBLAS&#xff1a;</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">  $ make ONLY_CBLAS=1
+</pre></div></div>
+<p>&#x6216;&#x8005;&#x7528;apt-get&#x5b89;&#x88c5;</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">    $ sudo apt-get install openblas-dev
+</pre></div></div>
+<p>&#x6216;&#x8005;</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">    $ sudo yum install openblas-devel
+</pre></div></div>
+<p>&#x540e;&#x4e24;&#x4e2a;&#x547d;&#x4ee4;&#x9700;&#x8981; root &#x6743;&#x9650;&#xff0c;&#x6ce8;&#x610f;OpenBLAS&#x5b89;&#x88c5;&#x540e;&#x8bbe;&#x7f6e;&#x73af;&#x5883;&#x53d8;&#x91cf;&#x5305;&#x542b;&#x5934;&#x6587;&#x4ef6;&#x548c;&#x5e93;&#x7684;&#x8def;&#x5f84;&#xff08;&#x53c2;&#x7167; &#x4f9d;&#x8d56; &#x5c0f;&#x8282;&#xff09;</p>
+
+<ul>
+  
+<li>Q9: &#x5f53;&#x6211;&#x5b89;&#x88c5; protocol buffer &#x65f6;&#xff0c;&#x88ab;&#x544a;&#x77e5; GLIBC++_3.4.20 not found in /usr/lib64/libstdc++.so.6.</li>
+</ul>
+<p>A9: &#x8fd9;&#x8bf4;&#x660e;&#x94fe;&#x63a5;&#x5668;&#x627e;&#x5230;&#x4e86; libstdc++.so.6&#xff0c;&#x4f46;&#x662f;&#x8fd9;&#x4e2a;&#x6587;&#x4ef6;&#x6bd4;&#x7528;&#x4e8e;&#x7f16;&#x8bd1;&#x548c;&#x94fe;&#x63a5;&#x7a0b;&#x5e8f;&#x7684;GCC&#x7248;&#x672c;&#x8001;&#x3002;&#x7a0b;&#x5e8f;&#x8981;&#x6c42;&#x5c5e;&#x4e8e;&#x65b0;&#x7248;&#x672c;GCC&#x7684;libstdc++&#xff0c;&#x6240;&#x4ee5;&#x5fc5;&#x987b;&#x544a;&#x8bc9;&#x94fe;&#x63a5;&#x5668;&#x600e;&#x4e48;&#x627e;&#x5230;&#x65b0;&#x7248;&#x672c;&#x7684;&#x989d;libstdc++&#x5171;&#x4eab;&#x5e93;&#x3002;&#x6700;&#x7b80;&#x5355;&#x7684;&#x89e3;&#x51b3;&#x65b9;&#x6cd5;&#x662f;&#x627e;&#x5230;&#x6b63;&#x786e;&#x7684; libstdc++&#xff0c;&#x5e76;&#x628a;&#x5b83;&#x5bfc;&#x51fa;&#x5230; LD_LIBRARY_PATH &#x4e2d;&#x3002;&#x5982;, &#x5982;&#x679c;GLIBC++_3.4.20 &#x88ab;&#x4e0b;&#x9762;&#x7684;&#x547d;&#x4ee4;&#x5217;&#x51fa;&#xff0c;</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">  $ strings /usr/local/lib64/libstdc++.so.6|grep GLIBC++
+</pre></div></div>
+<p>&#x4f60;&#x53ea;&#x9700;&#x8fd9;&#x6837;&#x8bbe;&#x7f6e;&#x4f60;&#x7684;&#x73af;&#x5883;&#x53d8;&#x91cf;&#xff1a;</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">  $ export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH
+</pre></div></div>
+
+<ul>
+  
+<li>Q10: &#x5f53;&#x6211;&#x5728;&#x7f16;&#x8bd1;glog&#x65f6;&#xff0c;&#x63d0;&#x793a;&#x5982;&#x4e0b;&#x9519;&#x8bef;&#x201c;src/logging_unittest.cc:83:20: error: &#x2018;gflags&#x2019; is not a namespace-name&#x201d;</li>
+</ul>
+<p>A10: &#x53ef;&#x80fd;&#x662f;&#x4f60;&#x5df2;&#x7ecf;&#x5b89;&#x88c5;&#x7684;gflags&#x7248;&#x672c;&#xff0c;&#x5176;&#x547d;&#x540d;&#x7a7a;&#x95f4;&#x4e0d;&#x662f;gflags&#xff0c;&#x800c;&#x662f;&#x5176;&#x4ed6;&#x7684;&#xff0c;&#x6bd4;&#x5982;&#x662f;&#x2019;google&#x2019;&#x3002;&#x56e0;&#x6b64;glog&#x4e0d;&#x80fd;&#x627e;&#x5230; &#x2018;gflags&#x2019; &#x547d;&#x540d;&#x7a7a;&#x95f4;&#x3002;</p>
+<p>&#x7f16;&#x8bd1;glog&#x4e0d;&#x9700;&#x8981;gflags&#xff0c;&#x4f60;&#x53ef;&#x4ee5;&#x4fee;&#x6539; configure.ac &#x6587;&#x4ef6;&#xff0c;&#x5ffd;&#x7565; gflags&#x3002;</p>
+
+<ol style="list-style-type: decimal">
+  
+<li>cd to glog src directory</li>
+  
+<li>&#x4fee;&#x6539; configure.ac &#x7b2c;125&#x884c;&#xff0c;&#x6539;&#x4e3a; &#x201c;AC_CHECK_LIB(gflags, main, ac_cv_have_libgflags=0, ac_cv_have_libgflags=0)&#x201d;</li>
+  
+<li>autoreconf</li>
+</ol>
+<p>&#x7136;&#x540e;&#xff0c;&#x8bf7;&#x91cd;&#x65b0;&#x7f16;&#x8bd1;glog&#x3002;</p></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+                      <div class="row-fluid">
+                                                                          
+<p>Copyright © 2015 The Apache Software Foundation. All rights reserved. Apache Singa, Apache, the Apache feather logo, and the Apache Singa project logos are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.</p>
+                          </div>
+
+        
+                </div>
+    </footer>
+        </body>
+</html>

Added: websites/staging/singa/trunk/content/docs/zh/mlp.html
==============================================================================
--- websites/staging/singa/trunk/content/docs/zh/mlp.html (added)
+++ websites/staging/singa/trunk/content/docs/zh/mlp.html Mon Jan 18 07:44:36 2016
@@ -0,0 +1,528 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-01-18 
+ | Rendered using Apache Maven Fluido Skin 1.4
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160118" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache SINGA &#x2013; MLP Example</title>
+    <link rel="stylesheet" href="../../css/apache-maven-fluido-1.4.min.css" />
+    <link rel="stylesheet" href="../../css/site.css" />
+    <link rel="stylesheet" href="../../css/print.css" media="print" />
+
+      
+    
+    
+  
+    <script type="text/javascript" src="../../js/apache-maven-fluido-1.4.min.js"></script>
+
+                          
+        
+<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
+                      
+        
+<script type="text/x-mathjax-config">MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});</script>
+                      
+        
+<meta content="Apache SINGA" name="author"/>
+                      
+        
+<meta content="SINGA, Deep Learning, Distributed training" name="keywords"/>
+          
+                  </head>
+        <body class="topBarEnabled">
+          
+    
+    
+            
+    
+        
+    <a href="https://github.com/apache/incubator-singa">
+      <img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;"
+        src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png"
+        alt="Fork me on GitHub">
+    </a>
+  
+                
+                    
+                
+
+    <div id="topbar" class="navbar navbar-fixed-top navbar-inverse">
+      <div class="navbar-inner">
+                <div class="container-fluid">
+        <a data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar">
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+        </a>
+                
+                                <ul class="nav">
+                          <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Apache SINGA <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../../docs/overview.html"  title="Introduction">Introduction</a>
+</li>
+                  
+                      <li>      <a href="../../docs/quick-start.html"  title="Quick Start">Quick Start</a>
+</li>
+                  
+                      <li>      <a href="../../downloads.html"  title="Downloads">Downloads</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Documentaion <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li class="dropdown-submenu">
+                                      <a href="../../docs/index.html"  title="v0.2.0">v0.2.0</a>
+              <ul class="dropdown-menu">
+                                  <li>      <a href="../../docs/index.html"  title="English">English</a>
+</li>
+                                  <li>      <a href="../../docs/zh/index.html"  title="中文">中文</a>
+</li>
+                                  <li>      <a href="../../docs/jp/index.html"  title="日本語">日本語</a>
+</li>
+                                  <li>      <a href="../../docs/kr/index.html"  title="한국어">한국어</a>
+</li>
+                              </ul>
+            </li>
+                  
+                      <li>      <a href="../../v0.1.0/index.html"  title="v0.1.0">v0.1.0</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Development <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../../develop/schedule.html"  title="Schedule">Schedule</a>
+</li>
+                  
+                      <li class="dropdown-submenu">
+                                      <a href="../../develop/how-contribute.html"  title="How to Contribute">How to Contribute</a>
+              <ul class="dropdown-menu">
+                                  <li>      <a href="../../develop/contribute-code.html"  title="Code">Code</a>
+</li>
+                                  <li>      <a href="../../develop/contribute-docs.html"  title="Documentation">Documentation</a>
+</li>
+                              </ul>
+            </li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Community <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../../community/source-repository.html"  title="Source Repository">Source Repository</a>
+</li>
+                  
+                      <li>      <a href="../../community/mail-lists.html"  title="Mailing Lists">Mailing Lists</a>
+</li>
+                  
+                      <li>      <a href="../../community/issue-tracking.html"  title="Issue Tracking">Issue Tracking</a>
+</li>
+                  
+                      <li>      <a href="../../community/team-list.html"  title="SINGA Team">SINGA Team</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">External Links <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="http://www.apache.org/"  title="Apache Software Foundation">Apache Software Foundation</a>
+</li>
+                  
+                      <li>      <a href="http://www.comp.nus.edu.sg/~dbsystem/singa/"  title="NUS Site">NUS Site</a>
+</li>
+                          </ul>
+      </li>
+                  </ul>
+          
+          
+          
+                   
+                      </div>
+          
+        </div>
+      </div>
+    </div>
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                                  <a href="../../index.html" id="bannerLeft" title="Apache SINGA">
+                                                                                                <img src="../../images/singa-logo.png"  alt="Apache SINGA"/>
+                </a>
+                      </div>
+        <div class="pull-right">              <div id="bannerRight">
+                                                                                                <img src="../../images/singa-title.png"  alt="Apache SINGA"/>
+                </div>
+      </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                              <li class="">
+                    <a href="../../index.html" title="Apache SINGA">
+        Apache SINGA</a>
+                    <span class="divider">/</span>
+      </li>
+        <li class="active ">MLP Example</li>
+        
+                
+                    
+      
+                            </ul>
+      </div>
+
+                  
+      <div class="row-fluid">
+        <div id="leftColumn" class="span2">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Apache SINGA</li>
+                              
+      <li>
+  
+                          <a href="../../docs/overview.html" title="Introduction">
+          <span class="none"></span>
+        Introduction</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../../docs/quick-start.html" title="Quick Start">
+          <span class="none"></span>
+        Quick Start</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../../downloads.html" title="Downloads">
+          <span class="none"></span>
+        Downloads</a>
+            </li>
+                              <li class="nav-header">Documentaion</li>
+                                                                                                                                      
+      <li>
+  
+                          <a href="../../docs/index.html" title="v0.2.0">
+          <span class="icon-chevron-right"></span>
+        v0.2.0</a>
+                  </li>
+                
+      <li>
+  
+                          <a href="../../v0.1.0/index.html" title="v0.1.0">
+          <span class="none"></span>
+        v0.1.0</a>
+            </li>
+                              <li class="nav-header">Development</li>
+                              
+      <li>
+  
+                          <a href="../../develop/schedule.html" title="Schedule">
+          <span class="none"></span>
+        Schedule</a>
+            </li>
+                                                                                    
+      <li>
+  
+                          <a href="../../develop/how-contribute.html" title="How to Contribute">
+          <span class="icon-chevron-right"></span>
+        How to Contribute</a>
+                  </li>
+                              <li class="nav-header">Community</li>
+                              
+      <li>
+  
+                          <a href="../../community/source-repository.html" title="Source Repository">
+          <span class="none"></span>
+        Source Repository</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../../community/mail-lists.html" title="Mailing Lists">
+          <span class="none"></span>
+        Mailing Lists</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../../community/issue-tracking.html" title="Issue Tracking">
+          <span class="none"></span>
+        Issue Tracking</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../../community/team-list.html" title="SINGA Team">
+          <span class="none"></span>
+        SINGA Team</a>
+            </li>
+                              <li class="nav-header">External Links</li>
+                              
+      <li>
+  
+                          <a href="http://www.apache.org/" class="externalLink" title="Apache Software Foundation">
+          <span class="none"></span>
+        Apache Software Foundation</a>
+            </li>
+                
+      <li>
+  
+                          <a href="http://www.comp.nus.edu.sg/~dbsystem/singa/" class="externalLink" title="NUS Site">
+          <span class="none"></span>
+        NUS Site</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                   <a href="http://incubator.apache.org" title="apache-incubator" class="builtBy">
+        <img class="builtBy"  alt="Apache Incubator" src="http://incubator.apache.org/images/egg-logo.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                        
+        <div id="bodyColumn"  class="span10" >
+                                  
+            <h1>MLP Example</h1>
+<hr />
+<p>Multilayer perceptron (MLP) is a subclass of feed-forward neural networks. A MLP typically consists of multiple directly connected layers, with each layer fully connected to the next one. In this example, we will use SINGA to train a <a class="externalLink" href="http://arxiv.org/abs/1003.0358">simple MLP model proposed by Ciresan</a> for classifying handwritten digits from the <a class="externalLink" href="http://yann.lecun.com/exdb/mnist/">MNIST dataset</a>.</p>
+<div class="section">
+<h2><a name="Running_instructions"></a>Running instructions</h2>
+<p>Please refer to the <a href="installation.html">installation</a> page for instructions on building SINGA, and the <a href="quick-start.html">quick start</a> for instructions on starting zookeeper.</p>
+<p>We have provided scripts for preparing the training and test dataset in <i>examples/cifar10/</i>.</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint"># in examples/mnist
+$ cp Makefile.example Makefile
+$ make download
+$ make create
+</pre></div></div>
+<div class="section">
+<h3><a name="Training_on_CPU"></a>Training on CPU</h3>
+<p>After the datasets are prepared, we start the training by</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">./bin/singa-run.sh -conf examples/mnist/job.conf
+</pre></div></div>
+<p>After it is started, you should see output like</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">Record job information to /tmp/singa-log/job-info/job-1-20150817-055231
+Executing : ./singa -conf /xxx/incubator-singa/examples/mnist/job.conf -singa_conf /xxx/incubator-singa/conf/singa.conf -singa_job 1
+E0817 07:15:09.211885 34073 cluster.cc:51] proc #0 -&gt; 192.168.5.128:49152 (pid = 34073)
+E0817 07:15:14.972231 34114 server.cc:36] Server (group = 0, id = 0) start
+E0817 07:15:14.972520 34115 worker.cc:134] Worker (group = 0, id = 0) start
+E0817 07:15:24.462602 34073 trainer.cc:373] Test step-0, loss : 2.341021, accuracy : 0.109100
+E0817 07:15:47.341076 34073 trainer.cc:373] Train step-0, loss : 2.357269, accuracy : 0.099000
+E0817 07:16:07.173364 34073 trainer.cc:373] Train step-10, loss : 2.222740, accuracy : 0.201800
+E0817 07:16:26.714855 34073 trainer.cc:373] Train step-20, loss : 2.091030, accuracy : 0.327200
+E0817 07:16:46.590946 34073 trainer.cc:373] Train step-30, loss : 1.969412, accuracy : 0.442100
+E0817 07:17:06.207080 34073 trainer.cc:373] Train step-40, loss : 1.865466, accuracy : 0.514800
+E0817 07:17:25.890033 34073 trainer.cc:373] Train step-50, loss : 1.773849, accuracy : 0.569100
+E0817 07:17:51.208935 34073 trainer.cc:373] Test step-60, loss : 1.613709, accuracy : 0.662100
+E0817 07:17:53.176766 34073 trainer.cc:373] Train step-60, loss : 1.659150, accuracy : 0.652600
+E0817 07:18:12.783370 34073 trainer.cc:373] Train step-70, loss : 1.574024, accuracy : 0.666000
+E0817 07:18:32.904942 34073 trainer.cc:373] Train step-80, loss : 1.529380, accuracy : 0.670500
+E0817 07:18:52.608111 34073 trainer.cc:373] Train step-90, loss : 1.443911, accuracy : 0.703500
+E0817 07:19:12.168465 34073 trainer.cc:373] Train step-100, loss : 1.387759, accuracy : 0.721000
+E0817 07:19:31.855865 34073 trainer.cc:373] Train step-110, loss : 1.335246, accuracy : 0.736500
+E0817 07:19:57.327133 34073 trainer.cc:373] Test step-120, loss : 1.216652, accuracy : 0.769900
+</pre></div></div>
+<p>After the training of some steps (depends on the setting) or the job is finished, SINGA will <a href="checkpoint.html">checkpoint</a> the model parameters.</p></div>
+<div class="section">
+<h3><a name="Training_on_GPU"></a>Training on GPU</h3>
+<p>To train this example model on GPU, just add a field in the configuration file for the GPU device,</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint"># job.conf
+gpu: 0
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Training_using_Python_script"></a>Training using Python script</h3>
+<p>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 <a class="externalLink" href="http://keras.io/">Keras API</a>.</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">./bin/singa-run.sh -exec tool/python/examples/mnist_mlp.py
+</pre></div></div></div></div>
+<div class="section">
+<h2><a name="Details"></a>Details</h2>
+<p>To train a model in SINGA, you need to prepare the datasets, and a job configuration which specifies the neural net structure, training algorithm (BP or CD), SGD update algorithm (e.g. Adagrad), number of training/test steps, etc.</p>
+<div class="section">
+<h3><a name="Data_preparation"></a>Data preparation</h3>
+<p>Before using SINGA, you need to write a program to pre-process the dataset you use to a format that SINGA can read. Please refer to the <a href="data.html">Data Preparation</a> to get details about preparing this MNIST dataset.</p></div>
+<div class="section">
+<h3><a name="Neural_net"></a>Neural net</h3>
+
+<div style="text-align: center">
+<img src="../images/example-mlp.png" style="width: 230px" alt="" />
+<br /><b>Figure 1 - Net structure of the MLP example. </b></img>
+</div>
+<p>Figure 1 shows the structure of the simple MLP model, which is constructed following <a class="externalLink" href="http://arxiv.org/abs/1003.0358">Ciresan&#x2019;s paper</a>. The dashed circle contains two layers which represent one feature transformation stage. There are 6 such stages in total. They sizes of the <a href="layer.html#innerproductlayer">InnerProductLayer</a>s in these circles decrease from 2500-&gt;2000-&gt;1500-&gt;1000-&gt;500-&gt;10.</p>
+<p>Next we follow the guide in <a href="neural-net.html">neural net page</a> and <a href="layer.html">layer page</a> to write the neural net configuration.</p>
+
+<ul>
+  
+<li>
+<p>We configure an input layer to read the training/testing records from a disk file.</p>
+  
+<div class="source">
+<div class="source"><pre class="prettyprint">layer {
+    name: &quot;data&quot;
+    type: kRecordInput
+    store_conf {
+      backend: &quot;kvfile&quot;
+      path: &quot;examples/mnist/train_data.bin&quot;
+      random_skip: 5000
+      batchsize: 64
+      shape: 784
+      std_value: 127.5
+      mean_value: 127.5
+     }
+     exclude: kTest
+  }
+
+layer {
+    name: &quot;data&quot;
+    type: kRecordInput
+    store_conf {
+      backend: &quot;kvfile&quot;
+      path: &quot;examples/mnist/test_data.bin&quot;
+      batchsize: 100
+      shape: 784
+      std_value: 127.5
+      mean_value: 127.5
+     }
+     exclude: kTrain
+  }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>All <a href="layer.html#innerproductlayer">InnerProductLayer</a>s are configured similarly as,</p>
+  
+<div class="source">
+<div class="source"><pre class="prettyprint">layer{
+  name: &quot;fc1&quot;
+  type: kInnerProduct
+  srclayers:&quot;data&quot;
+  innerproduct_conf{
+    num_output: 2500
+  }
+  param{
+    name: &quot;w1&quot;
+    ...
+  }
+  param{
+    name: &quot;b1&quot;
+    ..
+  }
+}
+</pre></div></div>
+<p>with the <tt>num_output</tt> decreasing from 2500 to 10.</p></li>
+  
+<li>
+<p>A <a href="layer.html#stanhlayer">STanhLayer</a> is connected to every InnerProductLayer except the last one. It transforms the feature via scaled tanh function.</p>
+  
+<div class="source">
+<div class="source"><pre class="prettyprint">layer{
+  name: &quot;tanh1&quot;
+  type: kSTanh
+  srclayers:&quot;fc1&quot;
+}
+</pre></div></div></li>
+  
+<li>
+<p>The final <a href="layer.html#softmaxloss">Softmax loss layer</a> connects to LabelLayer and the last STanhLayer.</p>
+  
+<div class="source">
+<div class="source"><pre class="prettyprint">layer{
+  name: &quot;loss&quot;
+  type:kSoftmaxLoss
+  softmaxloss_conf{ topk:1 }
+  srclayers:&quot;fc6&quot;
+  srclayers:&quot;data&quot;
+}
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="Updater"></a>Updater</h3>
+<p>The <a href="updater.html#updater">normal SGD updater</a> is selected. The learning rate shrinks by 0.997 every 60 steps (i.e., one epoch).</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">updater{
+  type: kSGD
+  learning_rate{
+    base_lr: 0.001
+    type : kStep
+    step_conf{
+      change_freq: 60
+      gamma: 0.997
+    }
+  }
+}
+</pre></div></div></div>
+<div class="section">
+<h3><a name="TrainOneBatch_algorithm"></a>TrainOneBatch algorithm</h3>
+<p>The MLP model is a feed-forward model, hence <a href="train-one-batch#back-propagation">Back-propagation algorithm</a> is selected.</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">train_one_batch {
+  alg: kBP
+}
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Cluster_setting"></a>Cluster setting</h3>
+<p>The following configuration set a single worker and server for training. <a href="frameworks.html">Training frameworks</a> page introduces configurations of a couple of distributed training frameworks.</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">cluster {
+  nworker_groups: 1
+  nserver_groups: 1
+}
+</pre></div></div></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+                      <div class="row-fluid">
+                                                                          
+<p>Copyright © 2015 The Apache Software Foundation. All rights reserved. Apache Singa, Apache, the Apache feather logo, and the Apache Singa project logos are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.</p>
+                          </div>
+
+        
+                </div>
+    </footer>
+        </body>
+</html>

Added: websites/staging/singa/trunk/content/docs/zh/neural-net.html
==============================================================================
--- websites/staging/singa/trunk/content/docs/zh/neural-net.html (added)
+++ websites/staging/singa/trunk/content/docs/zh/neural-net.html Mon Jan 18 07:44:36 2016
@@ -0,0 +1,563 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-01-18 
+ | Rendered using Apache Maven Fluido Skin 1.4
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160118" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache SINGA &#x2013; Neural Net</title>
+    <link rel="stylesheet" href="../../css/apache-maven-fluido-1.4.min.css" />
+    <link rel="stylesheet" href="../../css/site.css" />
+    <link rel="stylesheet" href="../../css/print.css" media="print" />
+
+      
+    
+    
+  
+    <script type="text/javascript" src="../../js/apache-maven-fluido-1.4.min.js"></script>
+
+                          
+        
+<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
+                      
+        
+<script type="text/x-mathjax-config">MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});</script>
+                      
+        
+<meta content="Apache SINGA" name="author"/>
+                      
+        
+<meta content="SINGA, Deep Learning, Distributed training" name="keywords"/>
+          
+                  </head>
+        <body class="topBarEnabled">
+          
+    
+    
+            
+    
+        
+    <a href="https://github.com/apache/incubator-singa">
+      <img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;"
+        src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png"
+        alt="Fork me on GitHub">
+    </a>
+  
+                
+                    
+                
+
+    <div id="topbar" class="navbar navbar-fixed-top navbar-inverse">
+      <div class="navbar-inner">
+                <div class="container-fluid">
+        <a data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar">
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+        </a>
+                
+                                <ul class="nav">
+                          <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Apache SINGA <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../../docs/overview.html"  title="Introduction">Introduction</a>
+</li>
+                  
+                      <li>      <a href="../../docs/quick-start.html"  title="Quick Start">Quick Start</a>
+</li>
+                  
+                      <li>      <a href="../../downloads.html"  title="Downloads">Downloads</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Documentaion <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li class="dropdown-submenu">
+                                      <a href="../../docs/index.html"  title="v0.2.0">v0.2.0</a>
+              <ul class="dropdown-menu">
+                                  <li>      <a href="../../docs/index.html"  title="English">English</a>
+</li>
+                                  <li>      <a href="../../docs/zh/index.html"  title="中文">中文</a>
+</li>
+                                  <li>      <a href="../../docs/jp/index.html"  title="日本語">日本語</a>
+</li>
+                                  <li>      <a href="../../docs/kr/index.html"  title="한국어">한국어</a>
+</li>
+                              </ul>
+            </li>
+                  
+                      <li>      <a href="../../v0.1.0/index.html"  title="v0.1.0">v0.1.0</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Development <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../../develop/schedule.html"  title="Schedule">Schedule</a>
+</li>
+                  
+                      <li class="dropdown-submenu">
+                                      <a href="../../develop/how-contribute.html"  title="How to Contribute">How to Contribute</a>
+              <ul class="dropdown-menu">
+                                  <li>      <a href="../../develop/contribute-code.html"  title="Code">Code</a>
+</li>
+                                  <li>      <a href="../../develop/contribute-docs.html"  title="Documentation">Documentation</a>
+</li>
+                              </ul>
+            </li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Community <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../../community/source-repository.html"  title="Source Repository">Source Repository</a>
+</li>
+                  
+                      <li>      <a href="../../community/mail-lists.html"  title="Mailing Lists">Mailing Lists</a>
+</li>
+                  
+                      <li>      <a href="../../community/issue-tracking.html"  title="Issue Tracking">Issue Tracking</a>
+</li>
+                  
+                      <li>      <a href="../../community/team-list.html"  title="SINGA Team">SINGA Team</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">External Links <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="http://www.apache.org/"  title="Apache Software Foundation">Apache Software Foundation</a>
+</li>
+                  
+                      <li>      <a href="http://www.comp.nus.edu.sg/~dbsystem/singa/"  title="NUS Site">NUS Site</a>
+</li>
+                          </ul>
+      </li>
+                  </ul>
+          
+          
+          
+                   
+                      </div>
+          
+        </div>
+      </div>
+    </div>
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                                  <a href="../../index.html" id="bannerLeft" title="Apache SINGA">
+                                                                                                <img src="../../images/singa-logo.png"  alt="Apache SINGA"/>
+                </a>
+                      </div>
+        <div class="pull-right">              <div id="bannerRight">
+                                                                                                <img src="../../images/singa-title.png"  alt="Apache SINGA"/>
+                </div>
+      </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                              <li class="">
+                    <a href="../../index.html" title="Apache SINGA">
+        Apache SINGA</a>
+                    <span class="divider">/</span>
+      </li>
+        <li class="active ">Neural Net</li>
+        
+                
+                    
+      
+                            </ul>
+      </div>
+
+                  
+      <div class="row-fluid">
+        <div id="leftColumn" class="span2">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Apache SINGA</li>
+                              
+      <li>
+  
+                          <a href="../../docs/overview.html" title="Introduction">
+          <span class="none"></span>
+        Introduction</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../../docs/quick-start.html" title="Quick Start">
+          <span class="none"></span>
+        Quick Start</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../../downloads.html" title="Downloads">
+          <span class="none"></span>
+        Downloads</a>
+            </li>
+                              <li class="nav-header">Documentaion</li>
+                                                                                                                                      
+      <li>
+  
+                          <a href="../../docs/index.html" title="v0.2.0">
+          <span class="icon-chevron-right"></span>
+        v0.2.0</a>
+                  </li>
+                
+      <li>
+  
+                          <a href="../../v0.1.0/index.html" title="v0.1.0">
+          <span class="none"></span>
+        v0.1.0</a>
+            </li>
+                              <li class="nav-header">Development</li>
+                              
+      <li>
+  
+                          <a href="../../develop/schedule.html" title="Schedule">
+          <span class="none"></span>
+        Schedule</a>
+            </li>
+                                                                                    
+      <li>
+  
+                          <a href="../../develop/how-contribute.html" title="How to Contribute">
+          <span class="icon-chevron-right"></span>
+        How to Contribute</a>
+                  </li>
+                              <li class="nav-header">Community</li>
+                              
+      <li>
+  
+                          <a href="../../community/source-repository.html" title="Source Repository">
+          <span class="none"></span>
+        Source Repository</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../../community/mail-lists.html" title="Mailing Lists">
+          <span class="none"></span>
+        Mailing Lists</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../../community/issue-tracking.html" title="Issue Tracking">
+          <span class="none"></span>
+        Issue Tracking</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../../community/team-list.html" title="SINGA Team">
+          <span class="none"></span>
+        SINGA Team</a>
+            </li>
+                              <li class="nav-header">External Links</li>
+                              
+      <li>
+  
+                          <a href="http://www.apache.org/" class="externalLink" title="Apache Software Foundation">
+          <span class="none"></span>
+        Apache Software Foundation</a>
+            </li>
+                
+      <li>
+  
+                          <a href="http://www.comp.nus.edu.sg/~dbsystem/singa/" class="externalLink" title="NUS Site">
+          <span class="none"></span>
+        NUS Site</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                   <a href="http://incubator.apache.org" title="apache-incubator" class="builtBy">
+        <img class="builtBy"  alt="Apache Incubator" src="http://incubator.apache.org/images/egg-logo.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                        
+        <div id="bodyColumn"  class="span10" >
+                                  
+            <h1>Neural Net</h1>
+<hr />
+<p><tt>NeuralNet</tt> in SINGA represents an instance of user&#x2019;s neural net model. As the neural net typically consists of a set of layers, <tt>NeuralNet</tt> comprises a set of unidirectionally connected <a href="layer.html">Layer</a>s. This page describes how to convert an user&#x2019;s neural net into the configuration of <tt>NeuralNet</tt>.</p>
+<p><img src="../images/model-category.png" align="center" width="200px" alt="" /> <span><b>Figure 1 - Categorization of popular deep learning models.</b></span></p>
+<div class="section">
+<h2><a name="Net_structure_configuration"></a>Net structure configuration</h2>
+<p>Users configure the <tt>NeuralNet</tt> by listing all layers of the neural net and specifying each layer&#x2019;s source layer names. Popular deep learning models can be categorized as Figure 1. The subsequent sections give details for each category.</p>
+<div class="section">
+<h3><a name="Feed-forward_models"></a>Feed-forward models</h3>
+
+<div align="left">
+<img src="../images/mlp-net.png" align="center" width="200px" alt="" />
+<span><b>Figure 2 - Net structure of a MLP model.</b></span>
+</div>
+<p>Feed-forward models, e.g., CNN and MLP, can easily get configured as their layer connections are undirected without circles. The configuration for the MLP model shown in Figure 1 is as follows,</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">net {
+  layer {
+    name : 'data&quot;
+    type : kData
+  }
+  layer {
+    name : 'image&quot;
+    type : kImage
+    srclayer: 'data'
+  }
+  layer {
+    name : 'label&quot;
+    type : kLabel
+    srclayer: 'data'
+  }
+  layer {
+    name : 'hidden&quot;
+    type : kHidden
+    srclayer: 'image'
+  }
+  layer {
+    name : 'softmax&quot;
+    type : kSoftmaxLoss
+    srclayer: 'hidden'
+    srclayer: 'label'
+  }
+}
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Energy_models"></a>Energy models</h3>
+<p><img src="../images/rbm-rnn.png" align="center" width="500px" alt="" /> <span><b>Figure 3 - Convert connections in RBM and RNN.</b></span></p>
+<p>For energy models including RBM, DBM, etc., their connections are undirected (i.e., Category B). To represent these models using <tt>NeuralNet</tt>, users can simply replace each connection with two directed connections, as shown in Figure 3a. In other words, for each pair of connected layers, their source layer field should include each other&#x2019;s name. The full <a href="rbm.html">RBM example</a> has detailed neural net configuration for a RBM model, which looks like</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">net {
+  layer {
+    name : &quot;vis&quot;
+    type : kVisLayer
+    param {
+      name : &quot;w1&quot;
+    }
+    srclayer: &quot;hid&quot;
+  }
+  layer {
+    name : &quot;hid&quot;
+    type : kHidLayer
+    param {
+      name : &quot;w2&quot;
+      share_from: &quot;w1&quot;
+    }
+    srclayer: &quot;vis&quot;
+  }
+}
+</pre></div></div></div>
+<div class="section">
+<h3><a name="RNN_models"></a>RNN models</h3>
+<p>For recurrent neural networks (RNN), users can remove the recurrent connections by unrolling the recurrent layer. For example, in Figure 3b, the original layer is unrolled into a new layer with 4 internal layers. In this way, the model is like a normal feed-forward model, thus can be configured similarly. The <a href="rnn.html">RNN example</a> has a full neural net configuration for a RNN model.</p></div></div>
+<div class="section">
+<h2><a name="Configuration_for_multiple_nets"></a>Configuration for multiple nets</h2>
+<p>Typically, a training job includes three neural nets for training, validation and test phase respectively. The three neural nets share most layers except the data layer, loss layer or output layer, etc.. To avoid redundant configurations for the shared layers, users can uses the <tt>exclude</tt> filed to filter a layer in the neural net, e.g., the following layer will be filtered when creating the testing <tt>NeuralNet</tt>.</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">layer {
+  ...
+  exclude : kTest # filter this layer for creating test net
+}
+</pre></div></div></div>
+<div class="section">
+<h2><a name="Neural_net_partitioning"></a>Neural net partitioning</h2>
+<p>A neural net can be partitioned in different ways to distribute the training over multiple workers.</p>
+<div class="section">
+<h3><a name="Batch_and_feature_dimension"></a>Batch and feature dimension</h3>
+<p><img src="../images/partition_fc.png" align="center" width="400px" alt="" /> <span><b>Figure 4 - Partitioning of a fully connected layer.</b></span></p>
+<p>Every layer&#x2019;s feature blob is considered a matrix whose rows are feature vectors. Thus, one layer can be split on two dimensions. Partitioning on dimension 0 (also called batch dimension) slices the feature matrix by rows. For instance, if the mini-batch size is 256 and the layer is partitioned into 2 sub-layers, each sub-layer would have 128 feature vectors in its feature blob. Partitioning on this dimension has no effect on the parameters, as every <a href="param.html">Param</a> object is replicated in the sub-layers. Partitioning on dimension 1 (also called feature dimension) slices the feature matrix by columns. For example, suppose the original feature vector has 50 units, after partitioning into 2 sub-layers, each sub-layer would have 25 units. This partitioning may result in <a href="param.html">Param</a> object being split, as shown in Figure 4. Both the bias vector and weight matrix are partitioned into two sub-layers.</p></div>
+<div class="section">
+<h3><a name="Partitioning_configuration"></a>Partitioning configuration</h3>
+<p>There are 4 partitioning schemes, whose configurations are give below,</p>
+
+<ol style="list-style-type: decimal">
+  
+<li>
+<p>Partitioning each singe layer into sub-layers on batch dimension (see  below). It is enabled by configuring the partition dimension of the layer to  0, e.g.,</p>
+  
+<div class="source">
+<div class="source"><pre class="prettyprint">  # with other fields omitted
+  layer {
+    partition_dim: 0
+  }
+</pre></div></div></li>
+  
+<li>
+<p>Partitioning each singe layer into sub-layers on feature dimension (see  below). It is enabled by configuring the partition dimension of the layer to  1, e.g.,</p>
+  
+<div class="source">
+<div class="source"><pre class="prettyprint">  # with other fields omitted
+  layer {
+    partition_dim: 1
+  }
+</pre></div></div></li>
+  
+<li>
+<p>Partitioning all layers into different subsets. It is enabled by  configuring the location ID of a layer, e.g.,</p>
+  
+<div class="source">
+<div class="source"><pre class="prettyprint">  # with other fields omitted
+  layer {
+    location: 1
+  }
+  layer {
+    location: 0
+  }
+</pre></div></div></li>
+</ol>
+
+<ol style="list-style-type: decimal">
+  
+<li>
+<p>Hybrid partitioning of strategy 1, 2 and 3. The hybrid partitioning is  useful for large models. An example application is to implement the  <a class="externalLink" href="http://arxiv.org/abs/1404.5997">idea proposed by Alex</a>.  Hybrid partitioning is configured like,</p>
+  
+<div class="source">
+<div class="source"><pre class="prettyprint">  # with other fields omitted
+  layer {
+    location: 1
+  }
+  layer {
+    location: 0
+  }
+  layer {
+    partition_dim: 0
+    location: 0
+  }
+  layer {
+    partition_dim: 1
+    location: 0
+  }
+</pre></div></div></li>
+</ol>
+<p>Currently SINGA supports strategy-2 well. Other partitioning strategies are are under test and will be released in later version.</p></div></div>
+<div class="section">
+<h2><a name="Parameter_sharing"></a>Parameter sharing</h2>
+<p>Parameters can be shared in two cases,</p>
+
+<ul>
+  
+<li>
+<p>sharing parameters among layers via user configuration. For example, the  visible layer and hidden layer of a RBM shares the weight matrix, which is configured through  the <tt>share_from</tt> field as shown in the above RBM configuration. The  configurations must be the same (except name) for shared parameters.</p></li>
+  
+<li>
+<p>due to neural net partitioning, some <tt>Param</tt> objects are replicated into  different workers, e.g., partitioning one layer on batch dimension. These  workers share parameter values. SINGA controls this kind of parameter  sharing automatically, users do not need to do any configuration.</p></li>
+  
+<li>
+<p>the <tt>NeuralNet</tt> for training and testing (and validation) share most layers  , thus share <tt>Param</tt> values.</p></li>
+</ul>
+<p>If the shared <tt>Param</tt> instances resident in the same process (may in different threads), they use the same chunk of memory space for their values. But they would have different memory spaces for their gradients. In fact, their gradients will be averaged by the stub or server.</p></div>
+<div class="section">
+<h2><a name="Advanced_user_guide"></a>Advanced user guide</h2>
+<div class="section">
+<h3><a name="Creation"></a>Creation</h3>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">static NeuralNet* NeuralNet::Create(const NetProto&amp; np, Phase phase, int num);
+</pre></div></div>
+<p>The above function creates a <tt>NeuralNet</tt> for a given phase, and returns a pointer to the <tt>NeuralNet</tt> instance. The phase is in {kTrain, kValidation, kTest}. <tt>num</tt> is used for net partitioning which indicates the number of partitions. Typically, a training job includes three neural nets for training, validation and test phase respectively. The three neural nets share most layers except the data layer, loss layer or output layer, etc.. The <tt>Create</tt> function takes in the full net configuration including layers for training, validation and test. It removes layers for phases other than the specified phase based on the <tt>exclude</tt> field in <a href="layer.html">layer configuration</a>:</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">layer {
+  ...
+  exclude : kTest # filter this layer for creating test net
+}
+</pre></div></div>
+<p>The filtered net configuration is passed to the constructor of <tt>NeuralNet</tt>:</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">NeuralNet::NeuralNet(NetProto netproto, int npartitions);
+</pre></div></div>
+<p>The constructor creates a graph representing the net structure firstly in</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">Graph* NeuralNet::CreateGraph(const NetProto&amp; netproto, int npartitions);
+</pre></div></div>
+<p>Next, it creates a layer for each node and connects layers if their nodes are connected.</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">void NeuralNet::CreateNetFromGraph(Graph* graph, int npartitions);
+</pre></div></div>
+<p>Since the <tt>NeuralNet</tt> instance may be shared among multiple workers, the <tt>Create</tt> function returns a pointer to the <tt>NeuralNet</tt> instance .</p></div>
+<div class="section">
+<h3><a name="Parameter_sharing"></a>Parameter sharing</h3>
+<p><tt>Param</tt> sharing is enabled by first sharing the Param configuration (in <tt>NeuralNet::Create</tt>) to create two similar (e.g., the same shape) Param objects, and then calling (in <tt>NeuralNet::CreateNetFromGraph</tt>),</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">void Param::ShareFrom(const Param&amp; from);
+</pre></div></div>
+<p>It is also possible to share <tt>Param</tt>s of two nets, e.g., sharing parameters of the training net and the test net,</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">void NeuralNet:ShareParamsFrom(NeuralNet* other);
+</pre></div></div>
+<p>It will call <tt>Param::ShareFrom</tt> for each Param object.</p></div>
+<div class="section">
+<h3><a name="Access_functions"></a>Access functions</h3>
+<p><tt>NeuralNet</tt> provides a couple of access function to get the layers and params of the net:</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">const std::vector&lt;Layer*&gt;&amp; layers() const;
+const std::vector&lt;Param*&gt;&amp; params() const ;
+Layer* name2layer(string name) const;
+Param* paramid2param(int id) const;
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Partitioning"></a>Partitioning</h3>
+<div class="section">
+<h4><a name="Implementation"></a>Implementation</h4>
+<p>SINGA partitions the neural net in <tt>CreateGraph</tt> function, which creates one node for each (partitioned) layer. For example, if one layer&#x2019;s partition dimension is 0 or 1, then it creates <tt>npartition</tt> nodes for it; if the partition dimension is -1, a single node is created, i.e., no partitioning. Each node is assigned a partition (or location) ID. If the original layer is configured with a location ID, then the ID is assigned to each newly created node. These nodes are connected according to the connections of the original layers. Some connection layers will be added automatically. For instance, if two connected sub-layers are located at two different workers, then a pair of bridge layers is inserted to transfer the feature (and gradient) blob between them. When two layers are partitioned on different dimensions, a concatenation layer which concatenates feature rows (or columns) and a slice layer which slices feature rows (or columns) would be inserted. These 
 connection layers help making the network communication and synchronization transparent to the users.</p></div>
+<div class="section">
+<h4><a name="Dispatching_partitions_to_workers"></a>Dispatching partitions to workers</h4>
+<p>Each (partitioned) layer is assigned a location ID, based on which it is dispatched to one worker. Particularly, the pointer to the <tt>NeuralNet</tt> instance is passed to every worker within the same group, but each worker only computes over the layers that have the same partition (or location) ID as the worker&#x2019;s ID. When every worker computes the gradients of the entire model parameters (strategy-2), we refer to this process as data parallelism. When different workers compute the gradients of different parameters (strategy-3 or strategy-1), we call this process model parallelism. The hybrid partitioning leads to hybrid parallelism where some workers compute the gradients of the same subset of model parameters while other workers compute on different model parameters. For example, to implement the hybrid parallelism in for the <a class="externalLink" href="http://arxiv.org/abs/1404.5997">DCNN model</a>, we set <tt>partition_dim = 0</tt> for lower layers and <tt>partition
 _dim = 1</tt> for higher layers.</p></div></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+                      <div class="row-fluid">
+                                                                          
+<p>Copyright © 2015 The Apache Software Foundation. All rights reserved. Apache Singa, Apache, the Apache feather logo, and the Apache Singa project logos are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.</p>
+                          </div>
+
+        
+                </div>
+    </footer>
+        </body>
+</html>



Mime
View raw message