singa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r985457 [34/35] - in /websites/staging/singa/trunk/content: ./ community/ develop/ docs/ docs/jp/ docs/kr/ docs/zh/ releases/ v0.1.0/ v0.2.0/ v0.2.0/jp/ v0.2.0/kr/ v0.2.0/zh/
Date Tue, 12 Apr 2016 06:24:54 GMT
Added: websites/staging/singa/trunk/content/v0.2.0/zh/overview.html
==============================================================================
--- websites/staging/singa/trunk/content/v0.2.0/zh/overview.html (added)
+++ websites/staging/singa/trunk/content/v0.2.0/zh/overview.html Tue Apr 12 06:24:50 2016
@@ -0,0 +1,371 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-04-12 
+ | 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="20160412" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache SINGA &#x2013; 简介</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.3.0">v0.3.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.2.0/index.html"  title="v0.2.0">v0.2.0</a>
+</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 ">简介</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.3.0">
+          <span class="icon-chevron-right"></span>
+        v0.3.0</a>
+                  </li>
+                
+      <li>
+  
+                          <a href="../../v0.2.0/index.html" title="v0.2.0">
+          <span class="none"></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>&#x7b80;&#x4ecb;</h1>
+<hr />
+<p>SINGA&#x662f;&#x4e00;&#x4e2a;&#x901a;&#x7528;&#x7684;&#x5206;&#x5e03;&#x5f0f;&#x6df1;&#x5ea6;&#x5b66;&#x4e60;&#x5e73;&#x53f0;&#xff0c;&#x9762;&#x5411;&#x8bad;&#x7ec3;&#x5927;&#x89c4;&#x6a21;&#x6570;&#x636e;&#x96c6;&#x4e0a;&#x7684;&#x5927;&#x578b;&#x6df1;&#x5ea6;&#x5b66;&#x4e60;&#x6a21;&#x578b;&#x3002;&#x5176;&#x8bbe;&#x8ba1;&#x57fa;&#x4e8e;&#x4e00;&#x79cd;&#x76f4;&#x89c2;&#x7684;&#x7f16;&#x7a0b;&#x6a21;&#x578b;&#xff0c;&#x5373;&#x6df1;&#x5ea6;&#x5b66;&#x4e60;&#x4e2d;&#x5c42;&#xff08;layer&#xff09;&#x7684;&#x62bd;&#x8c61;&#x3002;SINGA&#x652f;&#x6301;&#x5927;&#x90e8;&#x5206;&#x6df1;&#x5ea6;&#x5b66;&#x4e60;&#x6a21;&#x578b;&#xff0c;&#x5305;&#x62ec;&#x5377;&#x79ef;&#x795e;&#x7ecf;&#x7f51;&#x7edc;&#xff08;CNN&#xff09;&#x3001;&#x53d7;&#x9650;&#x6ce2;&#x5c14;&#x5179;&#x66fc;&#x6a21;&#x578b;&#xff08;RBM&#xff09;&#x548c;&#x5faa;&#x73af;&#x795e;&#x7ecf;&#x7f51;&#x7edc;&#xff08;RNN&#xff09;&#x7b49;&#xff0c;&#x4e3a;&#x7528;&#x6237;&#x63d0;&#x4f9b;&#x8bb8;&#x591a;&#x53ef;&#x76f4;&#x63a5;&#x4f7f;&#x7528;&#
 x7684;&#x5185;&#x5efa;&#x5c42;&#x3002;SINGA&#x67b6;&#x6784;&#x7075;&#x6d3b;&#xff0c;&#x652f;&#x6301;&#x540c;&#x6b65;&#x8bad;&#x7ec3;&#x3001;&#x5f02;&#x6b65;&#x8bad;&#x7ec3;&#x548c;&#x6df7;&#x5408;&#x5f0f;&#x8bad;&#x7ec3;&#x3002;&#x4e3a;&#x4e86;&#x5e76;&#x884c;&#x5730;&#x8bad;&#x7ec3;&#x6df1;&#x5ea6;&#x5b66;&#x4e60;&#x6a21;&#x578b;&#xff0c;SINGA&#x652f;&#x6301;&#x4e0d;&#x540c;&#x7684;&#x795e;&#x7ecf;&#x7f51;&#x7edc;&#x5212;&#x5206;&#x673a;&#x5236;&#xff0c;&#x5373;&#x6279;&#x6b21;&#x7ef4;&#x5ea6;&#x5212;&#x5206;&#xff08;batch dimension partition&#xff09;&#xff0c;&#x7279;&#x5f81;&#x7ef4;&#x5ea6;&#x5212;&#x5206;&#xff08;feature dimension partition&#xff09;&#x548c;&#x591a;&#x7ef4;&#x5ea6;&#x6df7;&#x5408;&#x5212;&#x5206;&#xff08;hybrid partition&#xff09;&#x3002;</p>
+<div class="section">
+<h2><a name="a"></a>&#x76ee;&#x6807;</h2>
+<p>&#x4f5c;&#x4e3a;&#x4e00;&#x4e2a;&#x5206;&#x5e03;&#x5f0f;&#x7cfb;&#x7edf;&#xff0c;SINGA&#x7684;&#x9996;&#x8981;&#x76ee;&#x6807;&#x5c31;&#x662f;&#x5177;&#x6709;&#x826f;&#x597d;&#x7684;&#x53ef;&#x6269;&#x5c55;&#x6027;&#x3002;&#x6362;&#x8a00;&#x4e4b;&#xff0c;SINGA&#x5e0c;&#x671b;&#x5728;&#x51c6;&#x786e;&#x5ea6;&#x4e00;&#x5b9a;&#x7684;&#x60c5;&#x51b5;&#x4e0b;&#xff0c;&#x901a;&#x8fc7;&#x5229;&#x7528;&#x66f4;&#x591a;&#x7684;&#x8ba1;&#x7b97;&#x8d44;&#x6e90;&#xff08;&#x5373;&#x8ba1;&#x7b97;&#x673a;&#xff09;&#x51cf;&#x5c11;&#x6a21;&#x578b;&#x7684;&#x8bad;&#x7ec3;&#x65f6;&#x95f4;&#x3002;</p>
+<p>SINGA&#x7684;&#x53e6;&#x4e00;&#x4e2a;&#x76ee;&#x6807;&#x662f;&#x6613;&#x7528;&#x6027;&#x3002;&#x5bf9;&#x7a0b;&#x5e8f;&#x5458;&#x6765;&#x8bf4;&#xff0c;&#x5f00;&#x53d1;&#x548c;&#x8bad;&#x7ec3;&#x6df1;&#x5c42;&#x7684;&#x590d;&#x6742;&#x7ed3;&#x6784;&#x7684;&#x6df1;&#x5ea6;&#x5b66;&#x4e60;&#x6a21;&#x578b;&#x5341;&#x5206;&#x56f0;&#x96be;&#x3002;&#x5206;&#x5e03;&#x5f0f;&#x8bad;&#x7ec3;&#x53c8;&#x8fdb;&#x4e00;&#x6b65;&#x589e;&#x52a0;&#x4e86;&#x7a0b;&#x5e8f;&#x5458;&#x7684;&#x8d1f;&#x62c5;&#xff0c;&#x6bd4;&#x5982;&#xff1a;&#x6570;&#x636e;&#x548c;&#x6a21;&#x578b;&#x5212;&#x5206;&#xff0c;&#x7f51;&#x7edc;&#x901a;&#x4fe1;&#x7b49;&#x3002;&#x56e0;&#x6b64;&#xff0c;&#x63d0;&#x4f9b;&#x4e00;&#x4e2a;&#x6613;&#x7528;&#x7684;&#x7f16;&#x7a0b;&#x6a21;&#x578b;&#x662f;&#x5341;&#x5206;&#x91cd;&#x8981;&#x7684;&#xff0c;&#x53ef;&#x4ee5;&#x8ba9;&#x7a0b;&#x5e8f;&#x5458;&#x5728;&#x5b9e;&#x73b0;&#x81ea;&#x5df1;&#x7684;&#x6df1;&#x5ea6;&#x5b66;&#x4e60;&#x6a21;&#x578b;&#x548c;&#x7b97;&#x6cd5;&#x65f6;&#x4e0d;&#x5fc5;&#x80
 03;&#x8651;&#x5e95;&#x5c42;&#x7684;&#x5206;&#x5e03;&#x5f0f;&#x5e73;&#x53f0;&#x3002;</p></div>
+<div class="section">
+<h2><a name="a"></a>&#x539f;&#x5219;</h2>
+<p>&#x6269;&#x5c55;&#x6027;&#x662f;&#x5206;&#x5e03;&#x5f0f;&#x6df1;&#x5ea6;&#x5b66;&#x4e60;&#x7684;&#x91cd;&#x8981;&#x7814;&#x7a76;&#x95ee;&#x9898;&#x3002;SINGA&#x63d0;&#x4f9b;&#x4e86;&#x4e00;&#x4e2a;&#x5229;&#x7528;&#x4e0d;&#x540c;&#x8bad;&#x7ec3;&#x6846;&#x67b6;&#x6269;&#x5c55;&#x6027;&#x7684;&#x901a;&#x7528;&#x5e73;&#x53f0;&#x3002;&#x540c;&#x6b65;&#x8bad;&#x7ec3;&#x6846;&#x67b6;&#x53ef;&#x63d0;&#x9ad8;&#x6bcf;&#x6b21;&#x8bad;&#x7ec3;&#x8fed;&#x4ee3;&#x7684;&#x6548;&#x7387;&#xff0c;&#x540c;&#x65f6;&#x5f02;&#x6b65;&#x8bad;&#x7ec3;&#x6846;&#x67b6;&#x53ef;&#x52a0;&#x5feb;&#x6a21;&#x578b;&#x6536;&#x655b;&#x3002;&#x5728;&#x9884;&#x7b97;&#xff08;&#x6bd4;&#x5982;&#xff1a;&#x96c6;&#x7fa4;&#x89c4;&#x6a21;&#xff09;&#x4e00;&#x5b9a;&#x7684;&#x60c5;&#x51b5;&#x4e0b;&#xff0c;&#x7528;&#x6237;&#x53ef;&#x4ee5;&#x8fd0;&#x884c;&#x4e00;&#x4e2a;&#x6df7;&#x5408;&#x8bad;&#x7ec3;&#x6846;&#x67b6;&#xff0c;&#x5728;&#x6548;&#x7387;&#x548c;&#x6536;&#x655b;&#x901f;&#x5ea6;&#x4e4b;&#x95f4;&#x6743;&#x8861;&#xff0c;&#x4e
 e5;&#x53d6;&#x5f97;&#x6700;&#x5927;&#x7684;&#x6269;&#x5c55;&#x6027;&#x3002;</p>
+<p>SINGA&#x7684;&#x7f16;&#x7a0b;&#x6a21;&#x578b;&#x662f;&#x57fa;&#x4e8e;&#x5c42;&#x7684;&#x62bd;&#x8c61;&#x800c;&#x8bbe;&#x8ba1;&#xff0c;&#x8fd9;&#x5bf9;&#x4e8e;&#x6df1;&#x5ea6;&#x5b66;&#x4e60;&#x6a21;&#x578b;&#x800c;&#x8a00;&#x662f;&#x5341;&#x5206;&#x76f4;&#x89c2;&#x7684;&#x3002;&#x5f88;&#x591a;&#x6df1;&#x5ea6;&#x5b66;&#x4e60;&#x6a21;&#x578b;&#x53ef;&#x4ee5;&#x76f4;&#x63a5;&#x7528;&#x8fd9;&#x79cd;&#x7f16;&#x7a0b;&#x6a21;&#x578b;&#x6765;&#x8868;&#x8fbe;&#x548c;&#x8bad;&#x7ec3;&#x3002;</p></div>
+<div class="section">
+<h2><a name="a"></a>&#x7cfb;&#x7edf;&#x6982;&#x89c8;</h2>
+<p><img src="../../images/sgd.png" align="center" width="400px" alt="" /> <span><b>&#x56fe;1 - &#x968f;&#x673a;&#x68af;&#x5ea6;&#x4e0b;&#x964d;&#x6d41;&#x7a0b;&#x56fe;</b></span></p>
+<p>&#x5bf9;&#x4e8e;&#x7279;&#x5b9a;&#x7684;&#x4efb;&#x52a1;&#xff0c;&#x8bad;&#x7ec3;&#x4e00;&#x4e2a;&#x6df1;&#x5ea6;&#x5b66;&#x4e60;&#x6a21;&#x578b;&#x5c31;&#x662f;&#x627e;&#x51fa;&#x80fd;&#x4ea7;&#x751f;&#x826f;&#x597d;&#x7279;&#x5f81;&#x7684;&#x8f6c;&#x6362;&#x51fd;&#x6570;&#x4e2d;&#x7684;&#x6700;&#x4f18;&#x53c2;&#x6570;&#x3002;&#x53c2;&#x6570;&#x7684;&#x5408;&#x9002;&#x7a0b;&#x5ea6;&#x7531;&#x635f;&#x5931;&#x51fd;&#x6570;&#x6765;&#x5ea6;&#x91cf;&#xff0c;&#x5982;&#x4ea4;&#x53c9;&#x71b5;&#x635f;&#x5931;&#x51fd;&#x6570;<a class="externalLink" href="https://en.wikipedia.org/wiki/Cross_entropy">&#xff08;Cross-Entropy Loss&#xff09;</a>&#x3002;&#x56e0;&#x4e3a;&#x635f;&#x5931;&#x51fd;&#x6570;&#x4e00;&#x822c;&#x90fd;&#x662f;&#x975e;&#x7ebf;&#x6027;&#x548c;&#x975e;&#x51f8;&#x7684;&#xff0c;&#x96be;&#x4ee5;&#x5f97;&#x5230;&#x4e00;&#x4e2a;&#x5c01;&#x95ed;&#x5f62;&#x5f0f;&#x89e3;&#x3002;&#x5178;&#x578b;&#x7684;&#x89e3;&#x51b3;&#x65b9;&#x6848;&#x662f;&#x4f7f;&#x7528;&#x968f;&#x673a;&#x68af;&#x5ea6;&
 #x4e0b;&#x964d;&#xff08;SGD&#xff09;&#x7b97;&#x6cd5;&#xff0c;&#x9996;&#x5148;&#x968f;&#x673a;&#x5730;&#x521d;&#x59cb;&#x5316;&#x53c2;&#x6570;&#xff0c;&#x7136;&#x540e;&#x8fed;&#x4ee3;&#x5730;&#x66f4;&#x65b0;&#x53c2;&#x6570;&#x503c;&#xff0c;&#x51cf;&#x5c0f;&#x635f;&#x5931;&#x51fd;&#x6570;&#x503c;&#xff0c;&#x5982;&#x56fe;1&#x6240;&#x793a;&#x3002;</p>
+<p><img src="../../images/overview.png" align="center" width="400px" alt="" /> <span><b>&#x56fe;2 - SINGA &#x6982;&#x89c8;</b></span></p>
+<p>SINGA&#x4f7f;&#x7528;&#x968f;&#x673a;&#x68af;&#x5ea6;&#x4e0b;&#x964d;&#x6765;&#x8bad;&#x7ec3;&#x6df1;&#x5ea6;&#x5b66;&#x4e60;&#x6a21;&#x578b;&#x4e2d;&#x7684;&#x53c2;&#x6570;&#x3002;&#x8bad;&#x7ec3;&#x7684;&#x4f5c;&#x4e1a;&#x4f1a;&#x88ab;&#x5206;&#x914d;&#x5230;&#x4f5c;&#x4e1a;&#x8005;&#xff08;worker&#xff09;&#x5355;&#x5143;&#x548c;&#x670d;&#x52a1;&#x5668;&#xff08;server&#xff09;&#x5355;&#x5143;&#xff0c;&#x5982;&#x56fe;2&#x6240;&#x793a;&#x3002;&#x6bcf;&#x6b21;&#x8fed;&#x4ee3;&#x4e2d;&#xff0c;&#x4f5c;&#x4e1a;&#x8005;&#x8c03;&#x7528; <i>TrainOneBatch</i> &#x51fd;&#x6570;&#x8ba1;&#x7b97;&#x53c2;&#x6570;&#x7684;&#x68af;&#x5ea6;&#x3002; <i>TainOneBatch</i> &#x51fd;&#x6570;&#x4ee5;&#x4e00;&#x4e2a;&#x795e;&#x7ecf;&#x7f51;&#x7edc;&#x5bf9;&#x8c61; <i>NeuralNet</i> &#x4f5c;&#x4e3a;&#x8f93;&#x5165;&#xff0c;&#x4ee5;&#x4e00;&#x5b9a;&#x7684;&#x987a;&#x5e8f;&#x904d;&#x5386; <i>NeuralNet</i>&#x3002;&#x8ba1;&#x7b97;&#x5f97;&#x5230;&#x7684;&#x68af;&#x5ea6;&#x5c06;&#x53d1;&#x9001;&#x7ed9;&#x5c40;&#x90e8;&#
 x7684;&#x6839;&#x8282;&#x70b9;&#xff08;stub&#xff09;&#xff0c;&#x8be5;&#x5c40;&#x90e8;&#x6839;&#x8282;&#x70b9;&#x805a;&#x5408;&#x8bf7;&#x6c42;&#x5e76;&#x8f6c;&#x53d1;&#x7ed9;&#x5bf9;&#x5e94;&#x7684;&#x670d;&#x52a1;&#x5668;&#x8bf7;&#x6c42;&#x66f4;&#x65b0;&#x3002;&#x670d;&#x52a1;&#x5668;&#x7ed9;&#x4f5c;&#x4e1a;&#x8005;&#x53d1;&#x56de;&#x66f4;&#x65b0;&#x540e;&#x7684;&#x53c2;&#x6570;&#xff0c;&#x8fdb;&#x5165;&#x4e0b;&#x4e00;&#x8f6e;&#x8fed;&#x4ee3;&#x3002;</p></div>
+<div class="section">
+<h2><a name="a"></a>&#x4f5c;&#x4e1a;&#x63d0;&#x4ea4;</h2>
+<p>&#x5728;SINGA&#x4e2d;&#x63d0;&#x4ea4;&#x4e00;&#x4e2a;&#x4f5c;&#x4e1a;&#xff08;&#x5373;&#x8bad;&#x7ec3;&#x4e00;&#x4e2a;&#x6df1;&#x5ea6;&#x5b66;&#x4e60;&#x6a21;&#x578b;&#xff09;&#xff0c;&#x7528;&#x6237;&#x9700;&#x8981;&#x5c06;&#x4efb;&#x52a1;&#x914d;&#x7f6e;&#x4f20;&#x7ed9;<a href="programming-guide.html">&#x4e3b;&#x51fd;&#x6570;</a>&#x4e2d;&#x7684;SINGA driver&#x3002;&#x4f5c;&#x4e1a;&#x914d;&#x7f6e;&#x9700;&#x8981;&#x660e;&#x786e;&#x56fe;2&#x4e2d;&#x7684;&#x56db;&#x4e2a;&#x4e3b;&#x8981;&#x90e8;&#x5206;&#xff1a;</p>
+
+<ul>
+  
+<li><a href="neural-net.html">NeuralNet</a> &#xff1a;&#x63cf;&#x8ff0;&#x795e;&#x7ecf;&#x7f51;&#x7edc;&#x7ed3;&#x6784;&#xff0c;&#x5305;&#x62ec;&#x6bcf;&#x5c42;&#x7684;&#x5177;&#x4f53;&#x8bbe;&#x7f6e;&#x548c;&#x5c42;&#x4e0e;&#x5c42;&#x7684;&#x8fde;&#x63a5;&#x5173;&#x7cfb;&#xff1b;</li>
+  
+<li><a href="train-one-batch.html">TrainOneBatch</a> &#xff1a;&#x8be5;&#x7b97;&#x6cd5;&#x9700;&#x8981;&#x6839;&#x636e;&#x4e0d;&#x540c;&#x7684;&#x6a21;&#x578b;&#x7c7b;&#x522b;&#x800c;&#x5b9a;&#x5236;;</li>
+  
+<li><a href="updater.html">Updater</a> &#xff1a;&#x5b9a;&#x4e49;&#x670d;&#x52a1;&#x5668;&#x7aef;&#x66f4;&#x65b0;&#x53c2;&#x6570;&#x7684;&#x534f;&#x8bae;&#xff1b;</li>
+  
+<li><a href="distributed-training.html">Cluster Topology</a> &#xff1a;&#x6307;&#x5b9a;&#x670d;&#x52a1;&#x5668;&#x548c;&#x5de5;&#x4f5c;&#x8005;&#x7684;&#x5206;&#x5e03;&#x5f0f;&#x62d3;&#x6251;&#x67b6;&#x6784;&#x3002;</li>
+</ul>
+<p>&#x4f5c;&#x4e1a;&#x63d0;&#x4ea4;&#x8fc7;&#x7a0b;&#x8ddf;Hadoop&#x7684;&#x4f5c;&#x4e1a;&#x63d0;&#x4ea4;&#x7c7b;&#x4f3c;&#xff0c;&#x7528;&#x6237;&#x5728;&#x4e3b;&#x51fd;&#x6570;&#x4e2d;&#x914d;&#x7f6e;&#x597d;&#x81ea;&#x5df1;&#x7684;&#x4efb;&#x52a1;&#xff0c;&#x8bbe;&#x7f6e;mapper&#x548c;reducer&#x7b49;&#x3002;&#x5728;Hadoop&#x4e2d;&#xff0c;&#x7528;&#x6237;&#x53ef;&#x7528;&#x81ea;&#x5df1;&#x5b9e;&#x73b0;&#x7684;&#x6216;&#x8005;&#x5185;&#x5efa;&#x7684;mapper&#x548c;reducer&#x6765;&#x914d;&#x7f6e;&#x4ed6;&#x4eec;&#x7684;&#x4f5c;&#x4e1a;&#xff1b;&#x7c7b;&#x4f3c;&#x5730;&#xff0c;&#x5728;SINGA&#x4e2d;&#xff0c;&#x7528;&#x6237;&#x4e5f;&#x53ef;&#x4ee5;&#x7528;&#x81ea;&#x5df1;&#x5b9e;&#x73b0;&#x7684;&#x6216;&#x8005;&#x5185;&#x5efa;&#x7684;layer&#xff0c;updater&#x7b49;&#x6765;&#x914d;&#x7f6e;&#x4ed6;&#x4eec;&#x7684;&#x4f5c;&#x4e1a;&#x3002;</p></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/v0.2.0/zh/programming-guide.html
==============================================================================
--- websites/staging/singa/trunk/content/v0.2.0/zh/programming-guide.html (added)
+++ websites/staging/singa/trunk/content/v0.2.0/zh/programming-guide.html Tue Apr 12 06:24:50 2016
@@ -0,0 +1,407 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-04-12 
+ | 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="20160412" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache SINGA &#x2013; 编程指南</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.3.0">v0.3.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.2.0/index.html"  title="v0.2.0">v0.2.0</a>
+</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 ">编程指南</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.3.0">
+          <span class="icon-chevron-right"></span>
+        v0.3.0</a>
+                  </li>
+                
+      <li>
+  
+                          <a href="../../v0.2.0/index.html" title="v0.2.0">
+          <span class="none"></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>&#x7f16;&#x7a0b;&#x6307;&#x5357;</h1>
+<hr />
+<p>&#x8981;&#x63d0;&#x4ea4;&#x4e00;&#x4e2a;&#x8bad;&#x7ec3;&#x4f5c;&#x4e1a;&#xff0c;&#x7528;&#x6237;&#x9700;&#x8981;&#x63d0;&#x4f9b;&#x56fe;1&#x4e2d;&#x7684;&#x56db;&#x4e2a;&#x90e8;&#x5206;&#x7684;&#x914d;&#x7f6e;&#xff1a;</p>
+
+<ul>
+  
+<li><a href="neural-net.html">NeuralNet</a> &#xff1a;&#x63cf;&#x8ff0;&#x795e;&#x7ecf;&#x7f51;&#x7edc;&#x7ed3;&#x6784;&#xff0c;&#x5305;&#x62ec;&#x6bcf;&#x5c42;&#x7684;&#x5177;&#x4f53;&#x8bbe;&#x7f6e;&#x548c;&#x5c42;&#x4e0e;&#x5c42;&#x7684;&#x8fde;&#x63a5;&#x5173;&#x7cfb;&#xff1b;</li>
+  
+<li><a href="train-one-batch.html">TrainOneBatch</a> &#xff1a;&#x8be5;&#x7b97;&#x6cd5;&#x9700;&#x8981;&#x6839;&#x636e;&#x4e0d;&#x540c;&#x7684;&#x6a21;&#x578b;&#x7c7b;&#x522b;&#x800c;&#x5b9a;&#x5236;;</li>
+  
+<li><a href="updater.html">Updater</a> &#xff1a;&#x5b9a;&#x4e49;&#x670d;&#x52a1;&#x5668;&#x7aef;&#x66f4;&#x65b0;&#x53c2;&#x6570;&#x7684;&#x534f;&#x8bae;&#xff1b;</li>
+  
+<li><a href="distributed-training.html">Cluster Topology</a> &#xff1a;&#x6307;&#x5b9a;&#x670d;&#x52a1;&#x5668;&#x548c;&#x5de5;&#x4f5c;&#x8005;&#x7684;&#x5206;&#x5e03;&#x5f0f;&#x62d3;&#x6251;&#x67b6;&#x6784;&#x3002;</li>
+</ul>
+<p><i>&#x521d;&#x7ea7;&#x7528;&#x6237;&#x6307;&#x5357;</i> &#x5c06;&#x4ecb;&#x7ecd;&#x5982;&#x4f55;&#x5229;&#x7528;&#x5185;&#x5efa;&#x5c42;&#x63d0;&#x4ea4;&#x4e00;&#x4e2a;&#x8bad;&#x7ec3;&#x4f5c;&#x4e1a;&#xff0c;&#x800c; <i>&#x9ad8;&#x7ea7;&#x7528;&#x6237;&#x6307;&#x5357;</i> &#x5c06;&#x8be6;&#x7ec6;&#x4ecb;&#x7ecd;&#x5982;&#x4f55;&#x7f16;&#x5199;&#x7528;&#x6237;&#x81ea;&#x5df1;&#x7684;&#x4e3b;&#x51fd;&#x6570;&#x5e76;&#x6ce8;&#x518c;&#x81ea;&#x5df1;&#x5b9e;&#x73b0;&#x7684;&#x7ec4;&#x4ef6;&#x3002;&#x6b64;&#x5916;&#xff0c;&#x9ad8;&#x7ea7;&#x7528;&#x6237;&#x548c;&#x521d;&#x7ea7;&#x7528;&#x6237;&#x5bf9;&#x8bad;&#x7ec3;&#x6570;&#x636e;&#x96c6;&#x7684;<a href="data.html">&#x5904;&#x7406;</a>&#x65b9;&#x5f0f;&#x662f;&#x76f8;&#x540c;&#x7684;&#x3002;</p>
+<p><img src="../../images/overview.png" align="center" width="400px" alt="" /> <span><b>&#x56fe; 1 - SINGA &#x6982;&#x89c8;</b></span></p>
+<div class="section">
+<h2><a name="a"></a>&#x521d;&#x7ea7;&#x7528;&#x6237;&#x6307;&#x5357;</h2>
+<p>&#x7528;&#x6237;&#x53ef;&#x4ee5;&#x4f7f;&#x7528;SINGA&#x63d0;&#x4f9b;&#x7684;&#x4e3b;&#x51fd;&#x6570;&#x63d0;&#x4ea4;&#x8bad;&#x7ec3;&#x4f5c;&#x4e1a;&#x3002;&#x5bf9;&#x4e8e;&#x8fd9;&#x79cd;&#x60c5;&#x51b5;&#xff0c;&#x7528;&#x6237;&#x5fc5;&#x987b;&#x5728;&#x547d;&#x4ee4;&#x884c;&#x4e2d;&#x63d0;&#x4f9b;&#x6839;&#x636e; <a href="../api/classsinga_1_1JobProto.html">JobProto</a> &#x8bbe;&#x7f6e;&#x7684;&#x4f5c;&#x4e1a;&#x914d;&#x7f6e;&#x6587;&#x4ef6;&#xff0c;</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">./bin/singa-run.sh -conf &lt;path to job conf&gt; [-resume]
+</pre></div></div>
+<p><tt>-resume</tt> &#x8868;&#x793a;&#x4ece;&#x4e0a;&#x6b21;&#x7684;<a href="checkpoint.html">&#x68c0;&#x67e5;&#x70b9;&#xff08;checkpoint&#xff09;</a>&#x7ee7;&#x7eed;&#x8bad;&#x7ec3;&#x3002; <a href="mlp.html">MLP</a> &#x6a21;&#x578b;&#x548c; <a href="cnn.html">CNN</a> &#x6a21;&#x578b;&#x4f7f;&#x7528;&#x5185;&#x5efa;&#x5c42;&#x63d0;&#x4ea4;&#x8bad;&#x7ec3;&#x4f5c;&#x4e1a;&#x3002;&#x8bf7;&#x9605;&#x8bfb;&#x76f8;&#x5173;&#x9875;&#x9762;&#xff0c;&#x67e5;&#x770b;&#x5b83;&#x4eec;&#x7684;&#x4f5c;&#x4e1a;&#x914d;&#x7f6e;&#x6587;&#x4ef6;&#xff0c;&#x8fd9;&#x4e9b;&#x9875;&#x9762;&#x4f1a;&#x4ecb;&#x7ecd;&#x6bcf;&#x4e2a;&#x7ec4;&#x4ef6;&#x914d;&#x7f6e;&#x7684;&#x7ec6;&#x8282;&#x3002;</p></div>
+<div class="section">
+<h2><a name="a"></a>&#x9ad8;&#x7ea7;&#x7528;&#x6237;&#x6307;&#x5357;</h2>
+<p>&#x5982;&#x679c;&#x7528;&#x6237;&#x7684;&#x6a21;&#x578b;&#x4e2d;&#x5305;&#x542b;&#x4e00;&#x4e9b;&#x81ea;&#x5df1;&#x5b9a;&#x4e49;&#x7684;&#x7ec4;&#x4ef6;&#xff0c;&#x6bd4;&#x5982;<a href="updater.html">Updater</a>&#xff0c;&#x7528;&#x6237;&#x5fc5;&#x987b;&#x81ea;&#x5df1;&#x7f16;&#x5199;&#x4e3b;&#x51fd;&#x6570;&#x6ce8;&#x518c;&#x8fd9;&#x4e9b;&#x7ec4;&#x4ef6;&#xff0c;&#x8ddf;Hadoop&#x7684;&#x4e3b;&#x51fd;&#x6570;&#x7c7b;&#x4f3c;&#x3002;&#x4e00;&#x822c;&#x5730;&#xff0c;&#x4e3b;&#x51fd;&#x6570;&#x5e94;&#x8be5;</p>
+
+<ul>
+  
+<li>&#x521d;&#x59cb;&#x5316;SINGA&#xff0c;&#x5982;&#xff1a;&#x8bbe;&#x7f6e;&#x65e5;&#x5fd7;&#xff1b;</li>
+  
+<li>&#x6ce8;&#x518c;&#x7528;&#x6237;&#x81ea;&#x5b9a;&#x4e49;&#x7ec4;&#x4ef6;&#xff1b;</li>
+  
+<li>&#x521b;&#x5efa;&#x4f5c;&#x4e1a;&#x914d;&#x7f6e;&#x5e76;&#x4f20;&#x9012;&#x7ed9;SINGA driver&#x3002;</li>
+</ul>
+<p>&#x4e3b;&#x51fd;&#x6570;&#x793a;&#x4f8b;</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">#include &quot;singa.h&quot;
+#include &quot;user.h&quot;  // header for user code
+
+int main(int argc, char** argv) {
+  singa::Driver driver;
+  driver.Init(argc, argv);
+  bool resume;
+  // parse resume option from argv.
+
+  // register user defined layers
+  driver.RegisterLayer&lt;FooLayer&gt;(kFooLayer);
+  // register user defined updater
+  driver.RegisterUpdater&lt;FooUpdater&gt;(kFooUpdater);
+  ...
+  auto jobConf = driver.job_conf();
+  //  update jobConf
+
+  driver.Train(resume, jobConf);
+  return 0;
+}
+</pre></div></div>
+<p>driver &#x7c7b;&#x2019; <tt>Init</tt> &#x65b9;&#x6cd5;&#x52a0;&#x8f7d;&#x7528;&#x6237;&#x5728;&#x547d;&#x4ee4;&#x884c;&#x53c2;&#x6570;&#x4e2d; &#xff08;<tt>-conf &lt;job conf&gt;</tt>&#xff09;&#x63d0;&#x4f9b;&#x7684;&#x4f5c;&#x4e1a;&#x914d;&#x7f6e;&#x6587;&#x4ef6;&#xff08;&#x81f3;&#x5c11;&#x5305;&#x542b;&#x96c6;&#x7fa4;&#x62d3;&#x6251;&#x7ed3;&#x6784;&#xff09;&#xff0c;&#x5e76;&#x8fd4;&#x56de;<tt>jobConf</tt>&#x7ed9;&#x7528;&#x6237;&#xff0c;&#x7528;&#x6237;&#x53ef;&#x66f4;&#x65b0;&#x548c;&#x6dfb;&#x52a0;&#x795e;&#x7ecf;&#x7f51;&#x7edc;&#x6216;&#x8005;Updater&#x7684;&#x914d;&#x7f6e;&#x3002;&#x5982;&#x679c;&#x5b9a;&#x4e49;&#x4e86;Layer&#x3001;Updater&#x3001;Worker&#x6216;&#x8005;Param&#x7684;&#x5b50;&#x7c7b;&#xff0c;&#x7528;&#x6237;&#x9700;&#x8981;&#x901a;&#x8fc7;driver&#x4e3a;&#x5b83;&#x4eec;&#x6ce8;&#x518c;&#x3002;&#x6700;&#x540e;&#xff0c;&#x4f5c;&#x4e1a;&#x914d;&#x7f6e;&#x4f1a;&#x88ab;&#x63d0;&#x4ea4;&#x5230;driver&#xff0c;&#x7531;driver&#x542f;&#x52a8;&#x8bad;&#x7ec3;&#x3002;</p>
+<p>&#x5c06;&#x6765;&#x6211;&#x4eec;&#x4f1a;&#x63d0;&#x4f9b;&#x7c7b;&#x4f3c;<a class="externalLink" href="https://github.com/fchollet/keras">keras</a> &#x7684;&#x5e2e;&#x52a9;&#x5de5;&#x5177;&#xff0c;&#x4f7f;&#x4f5c;&#x4e1a;&#x914d;&#x7f6e;&#x66f4;&#x52a0;&#x7b80;&#x5355;&#x3002;</p>
+<p>&#x7528;&#x6237;&#x9700;&#x8981;&#x4f7f;&#x7528;SINGA&#x5e93;(<i>.libs/libsinga.so</i>)&#x7f16;&#x8bd1;&#x548c;&#x94fe;&#x63a5;&#x81ea;&#x5df1;&#x7684;&#x4ee3;&#x7801;&#xff08;&#x5982;&#xff1a;layer&#x7684;&#x5b9e;&#x73b0;&#x548c;&#x4e3b;&#x51fd;&#x6570;&#xff09;&#xff0c;&#x5f97;&#x5230;&#x53ef;&#x6267;&#x884c;&#x6587;&#x4ef6;&#xff0c;&#x5982;&#x540d;&#x4e3a;<i>mysinga</i> &#x7684;&#x6587;&#x4ef6;&#x3002;&#x6267;&#x884c;&#x4ee5;&#x4e0b;&#x547d;&#x4ee4;&#x542f;&#x52a8;&#x8be5;&#x7a0b;&#x5e8f;&#xff0c;&#x7528;&#x6237;&#x9700;&#x8981;&#x5c06;<i>mysinga</i> &#x548c;&#x4f5c;&#x4e1a;&#x914d;&#x7f6e;&#x6587;&#x4ef6;&#x7684;&#x8def;&#x5f84;&#x4f20;&#x7ed9; <i>./bin/singa-run.sh</i> &#x3002;</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">./bin/singa-run.sh -conf &lt;path to job conf&gt; -exec &lt;path to mysinga&gt; [other arguments]
+</pre></div></div>
+<p><a href="rnn.html">RNN application</a> &#x63d0;&#x4f9b;&#x4e86;&#x4e00;&#x4e2a;&#x5b8c;&#x6574;&#x7684;&#x5b9e;&#x73b0;&#x4e3b;&#x51fd;&#x6570;&#x8bad;&#x7ec3;&#x7279;&#x5b9a;RNN&#x6a21;&#x578b;&#x7684;&#x4f8b;&#x5b50;&#x3002;</p></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/v0.2.0/zh/rnn.html
==============================================================================
--- websites/staging/singa/trunk/content/v0.2.0/zh/rnn.html (added)
+++ websites/staging/singa/trunk/content/v0.2.0/zh/rnn.html Tue Apr 12 06:24:50 2016
@@ -0,0 +1,674 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-04-12 
+ | 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="20160412" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache SINGA &#x2013; Recurrent Neural Networks for Language Modelling</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.3.0">v0.3.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.2.0/index.html"  title="v0.2.0">v0.2.0</a>
+</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 ">Recurrent Neural Networks for Language Modelling</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.3.0">
+          <span class="icon-chevron-right"></span>
+        v0.3.0</a>
+                  </li>
+                
+      <li>
+  
+                          <a href="../../v0.2.0/index.html" title="v0.2.0">
+          <span class="none"></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>Recurrent Neural Networks for Language Modelling</h1>
+<hr />
+<p>Recurrent Neural Networks (RNN) are widely used for modelling sequential data, such as music and sentences. In this example, we use SINGA to train a <a class="externalLink" href="http://www.fit.vutbr.cz/research/groups/speech/publi/2010/mikolov_interspeech2010_IS100722.pdf">RNN model</a> proposed by Tomas Mikolov for <a class="externalLink" href="https://en.wikipedia.org/wiki/Language_model">language modeling</a>. The training objective (loss) is to minimize the <a class="externalLink" href="https://en.wikipedia.org/wiki/Perplexity">perplexity per word</a>, which is equivalent to maximize the probability of predicting the next word given the current word in a sentence.</p>
+<p>Different to the <a href="cnn.html">CNN</a>, <a href="mlp.html">MLP</a> and <a href="rbm.html">RBM</a> examples which use built-in layers(layer) and records(data), none of the layers in this example are built-in. Hence users would learn to implement their own layers and data records through this example.</p>
+<div class="section">
+<h2><a name="Running_instructions"></a>Running instructions</h2>
+<p>In <i>SINGA_ROOT/examples/rnnlm/</i>, scripts are provided to run the training job. First, the data is prepared by</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">$ cp Makefile.example Makefile
+$ make download
+$ make create
+</pre></div></div>
+<p>Second, to compile the source code under <i>examples/rnnlm/</i>, run</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">$ make rnnlm
+</pre></div></div>
+<p>An executable file <i>rnnlm.bin</i> will be generated.</p>
+<p>Third, the training is started by passing <i>rnnlm.bin</i> and the job configuration to <i>singa-run.sh</i>,</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint"># at SINGA_ROOT/
+# export LD_LIBRARY_PATH=.libs:$LD_LIBRARY_PATH
+$ ./bin/singa-run.sh -exec examples/rnnlm/rnnlm.bin -conf examples/rnnlm/job.conf
+</pre></div></div></div>
+<div class="section">
+<h2><a name="Implementations"></a>Implementations</h2>
+<p><img src="../images/rnnlm.png" align="center" width="400px" alt="" /> <span><b>Figure 1 - Net structure of the RNN model.</b></span></p>
+<p>The neural net structure is shown Figure 1. Word records are loaded by <tt>DataLayer</tt>. For every iteration, at most <tt>max_window</tt> word records are processed. If a sentence ending character is read, the <tt>DataLayer</tt> stops loading immediately. <tt>EmbeddingLayer</tt> looks up a word embedding matrix to extract feature vectors for words loaded by the <tt>DataLayer</tt>. These features are transformed by the <tt>HiddenLayer</tt> which propagates the features from left to right. The output feature for word at position k is influenced by words from position 0 to k-1. Finally, <tt>LossLayer</tt> computes the cross-entropy loss (see below) by predicting the next word of each word. The cross-entropy loss is computed as</p>
+<p><tt>$$L(w_t)=-log P(w_{t+1}|w_t)$$</tt></p>
+<p>Given <tt>$w_t$</tt> the above equation would compute over all words in the vocabulary, which is time consuming. <a class="externalLink" href="https://f25ea9ccb7d3346ce6891573d543960492b92c30.googledrive.com/host/0ByxdPXuxLPS5RFM5dVNvWVhTd0U/rnnlm-0.4b.tgz">RNNLM Toolkit</a> accelerates the computation as</p>
+<p><tt>$$P(w_{t+1}|w_t) = P(C_{w_{t+1}}|w_t) * P(w_{t+1}|C_{w_{t+1}})$$</tt></p>
+<p>Words from the vocabulary are partitioned into a user-defined number of classes. The first term on the left side predicts the class of the next word, and then predicts the next word given its class. Both the number of classes and the words from one class are much smaller than the vocabulary size. The probabilities can be calculated much faster.</p>
+<p>The perplexity per word is computed by,</p>
+<p><tt>$$PPL = 10^{- avg_t log_{10} P(w_{t+1}|w_t)}$$</tt></p>
+<div class="section">
+<h3><a name="Data_preparation"></a>Data preparation</h3>
+<p>We use a small dataset provided by the <a class="externalLink" href="https://f25ea9ccb7d3346ce6891573d543960492b92c30.googledrive.com/host/0ByxdPXuxLPS5RFM5dVNvWVhTd0U/rnnlm-0.4b.tgz">RNNLM Toolkit</a>. It has 10,000 training sentences, with 71350 words in total and 3720 unique words. The subsequent steps follow the instructions in <a href="data.html">Data Preparation</a> to convert the raw data into records and insert them into data stores.</p>
+<div class="section">
+<h4><a name="Download_source_data"></a>Download source data</h4>
+
+<div class="source">
+<div class="source"><pre class="prettyprint"># in SINGA_ROOT/examples/rnnlm/
+cp Makefile.example Makefile
+make download
+</pre></div></div></div>
+<div class="section">
+<h4><a name="Define_record_format"></a>Define record format</h4>
+<p>We define the word record as follows,</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint"># in SINGA_ROOT/examples/rnnlm/rnnlm.proto
+message WordRecord {
+  optional string word = 1;
+  optional int32 word_index = 2;
+  optional int32 class_index = 3;
+  optional int32 class_start = 4;
+  optional int32 class_end = 5;
+}
+</pre></div></div>
+<p>It includes the word string and its index in the vocabulary. Words in the vocabulary are sorted based on their frequency in the training dataset. The sorted list is cut into 100 sublists such that each sublist has 1/100 total word frequency. Each sublist is called a class. Hence each word has a <tt>class_index</tt> ([0,100)). The <tt>class_start</tt> is the index of the first word in the same class as <tt>word</tt>. The <tt>class_end</tt> is the index of the first word in the next class.</p></div>
+<div class="section">
+<h4><a name="Create_data_stores"></a>Create data stores</h4>
+<p>We use code from RNNLM Toolkit to read words, and sort them into classes. The main function in <i>create_store.cc</i> first creates word classes based on the training dataset. Second it calls the following function to create data store for the training, validation and test dataset.</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">int create_data(const char *input_file, const char *output_file);
+</pre></div></div>
+<p><tt>input</tt> is the path to training/validation/testing text file from the RNNLM Toolkit, <tt>output</tt> is output store file. This function starts with</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">singa::io::KVFile store;
+store.Open(output, signa::io::kCreate);
+</pre></div></div>
+<p>Then it reads the words one by one. For each word it creates a <tt>WordRecord</tt> instance, and inserts it into the store,</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">int wcnt = 0; // word count
+WordRecord  wordRecord;
+while(1) {
+  readWord(wordstr, fin);
+  if (feof(fin)) break;
+  ...// fill in the wordRecord;
+  string val;
+  wordRecord.SerializeToString(&amp;val);
+  int length = snprintf(key, BUFFER_LEN, &quot;%05d&quot;, wcnt++);
+  store.Write(string(key, length), val);
+}
+</pre></div></div>
+<p>Compilation and running commands are provided in the <i>Makefile.example</i>. After executing</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">make create
+</pre></div></div>
+<p><i>train_data.bin</i>, <i>test_data.bin</i> and <i>valid_data.bin</i> will be created.</p></div></div>
+<div class="section">
+<h3><a name="Layer_implementation"></a>Layer implementation</h3>
+<p>4 user-defined layers are implemented for this application. Following the guide for implementing <a href="layer#implementing-a-new-layer-subclass">new Layer subclasses</a>, we extend the <a href="../api/classsinga_1_1LayerProto.html">LayerProto</a> to include the configuration messages of user-defined layers as shown below (3 out of the 7 layers have specific configurations),</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">import &quot;job.proto&quot;;     // Layer message for SINGA is defined
+
+//For implementation of RNNLM application
+extend singa.LayerProto {
+  optional EmbeddingProto embedding_conf = 101;
+  optional LossProto loss_conf = 102;
+  optional DataProto data_conf = 103;
+}
+</pre></div></div>
+<p>In the subsequent sections, we describe the implementation of each layer, including its configuration message.</p>
+<div class="section">
+<h4><a name="RNNLayer"></a>RNNLayer</h4>
+<p>This is the base layer of all other layers for this applications. It is defined as follows,</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">class RNNLayer : virtual public Layer {
+public:
+  inline int window() { return window_; }
+protected:
+  int window_;
+};
+</pre></div></div>
+<p>For this application, two iterations may process different number of words. Because sentences have different lengths. The <tt>DataLayer</tt> decides the effective window size. All other layers call its source layers to get the effective window size and resets <tt>window_</tt> in <tt>ComputeFeature</tt> function.</p></div>
+<div class="section">
+<h4><a name="DataLayer"></a>DataLayer</h4>
+<p>DataLayer is for loading Records.</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">class DataLayer : public RNNLayer, singa::InputLayer {
+ public:
+  void Setup(const LayerProto&amp; proto, const vector&lt;Layer*&gt;&amp; srclayers) override;
+  void ComputeFeature(int flag, const vector&lt;Layer*&gt;&amp; srclayers) override;
+  int max_window() const {
+    return max_window_;
+  }
+ private:
+  int max_window_;
+  singa::io::Store* store_;
+};
+</pre></div></div>
+<p>The Setup function gets the user configured max window size.</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">max_window_ = proto.GetExtension(input_conf).max_window();
+</pre></div></div>
+<p>The <tt>ComputeFeature</tt> function loads at most max_window records. It could also stop when the sentence ending character is encountered.</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">...// shift the last record to the first
+window_ = max_window_;
+for (int i = 1; i &lt;= max_window_; i++) {
+  // load record; break if it is the ending character
+}
+</pre></div></div>
+<p>The configuration of <tt>DataLayer</tt> is like</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">name: &quot;data&quot;
+user_type: &quot;kData&quot;
+[data_conf] {
+  path: &quot;examples/rnnlm/train_data.bin&quot;
+  max_window: 10
+}
+</pre></div></div></div>
+<div class="section">
+<h4><a name="EmbeddingLayer"></a>EmbeddingLayer</h4>
+<p>This layer gets records from <tt>DataLayer</tt>. For each record, the word index is parsed and used to get the corresponding word feature vector from the embedding matrix.</p>
+<p>The class is declared as follows,</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">class EmbeddingLayer : public RNNLayer {
+  ...
+  const std::vector&lt;Param*&gt; GetParams() const override {
+    std::vector&lt;Param*&gt; params{embed_};
+    return params;
+  }
+ private:
+  int word_dim_, vocab_size_;
+  Param* embed_;
+}
+</pre></div></div>
+<p>The <tt>embed_</tt> field is a matrix whose values are parameter to be learned. The matrix size is <tt>vocab_size_</tt> x <tt>word_dim_</tt>.</p>
+<p>The Setup function reads configurations for <tt>word_dim_</tt> and <tt>vocab_size_</tt>. Then it allocates feature Blob for <tt>max_window</tt> words and setups <tt>embed_</tt>.</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">int max_window = srclayers[0]-&gt;data(this).shape()[0];
+word_dim_ = proto.GetExtension(embedding_conf).word_dim();
+data_.Reshape(vector&lt;int&gt;{max_window, word_dim_});
+...
+embed_-&gt;Setup(vector&lt;int&gt;{vocab_size_, word_dim_});
+</pre></div></div>
+<p>The <tt>ComputeFeature</tt> function simply copies the feature vector from the <tt>embed_</tt> matrix into the feature Blob.</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint"># reset effective window size
+window_ = datalayer-&gt;window();
+auto records = datalayer-&gt;records();
+...
+for (int t = 0; t &lt; window_; t++) {
+  int idx  &lt;- word index
+  Copy(words[t], embed[idx]);
+}
+</pre></div></div>
+<p>The <tt>ComputeGradient</tt> function copies back the gradients to the <tt>embed_</tt> matrix.</p>
+<p>The configuration for <tt>EmbeddingLayer</tt> is like,</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">user_type: &quot;kEmbedding&quot;
+[embedding_conf] {
+  word_dim: 15
+  vocab_size: 3720
+}
+srclayers: &quot;data&quot;
+param {
+  name: &quot;w1&quot;
+  init {
+    type: kUniform
+    low:-0.3
+    high:0.3
+  }
+}
+</pre></div></div></div>
+<div class="section">
+<h4><a name="HiddenLayer"></a>HiddenLayer</h4>
+<p>This layer unrolls the recurrent connections for at most max_window times. The feature for position k is computed based on the feature from the embedding layer (position k) and the feature at position k-1 of this layer. The formula is</p>
+<p><tt>$$f[k]=\sigma (f[t-1]*W+src[t])$$</tt></p>
+<p>where <tt>$W$</tt> is a matrix with <tt>word_dim_</tt> x <tt>word_dim_</tt> parameters.</p>
+<p>If you want to implement a recurrent neural network following our design, this layer is of vital importance for you to refer to.</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">class HiddenLayer : public RNNLayer {
+  ...
+  const std::vector&lt;Param*&gt; GetParams() const override {
+    std::vector&lt;Param*&gt; params{weight_};
+    return params;
+  }
+private:
+  Param* weight_;
+};
+</pre></div></div>
+<p>The <tt>Setup</tt> function setups the weight matrix as</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">weight_-&gt;Setup(std::vector&lt;int&gt;{word_dim, word_dim});
+</pre></div></div>
+<p>The <tt>ComputeFeature</tt> function gets the effective window size (<tt>window_</tt>) from its source layer i.e., the embedding layer. Then it propagates the feature from position 0 to position <tt>window_</tt> -1. The detailed descriptions for this process are illustrated as follows.</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">void HiddenLayer::ComputeFeature() {
+  for(int t = 0; t &lt; window_size; t++){
+    if(t == 0)
+      Copy(data[t], src[t]);
+    else
+      data[t]=sigmoid(data[t-1]*W + src[t]);
+  }
+}
+</pre></div></div>
+<p>The <tt>ComputeGradient</tt> function computes the gradient of the loss w.r.t. W and the source layer. Particularly, for each position k, since data[k] contributes to data[k+1] and the feature at position k in its destination layer (the loss layer), grad[k] should contains the gradient from two parts. The destination layer has already computed the gradient from the loss layer into grad[k]; In the <tt>ComputeGradient</tt> function, we need to add the gradient from position k+1.</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">void HiddenLayer::ComputeGradient(){
+  ...
+  for (int k = window_ - 1; k &gt;= 0; k--) {
+    if (k &lt; window_ - 1) {
+      grad[k] += dot(grad[k + 1], weight.T()); // add gradient from position t+1.
+    }
+    grad[k] =... // compute gL/gy[t], y[t]=data[t-1]*W+src[t]
+  }
+  gweight = dot(data.Slice(0, window_-1).T(), grad.Slice(1, window_));
+  Copy(gsrc, grad);
+}
+</pre></div></div>
+<p>After the loop, we get the gradient of the loss w.r.t y[k], which is used to compute the gradient of W and the src[k].</p></div>
+<div class="section">
+<h4><a name="LossLayer"></a>LossLayer</h4>
+<p>This layer computes the cross-entropy loss and the <tt>$log_{10}P(w_{t+1}|w_t)$</tt> (which could be averaged over all words by users to get the PPL value).</p>
+<p>There are two configuration fields to be specified by users.</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">message LossProto {
+  optional int32 nclass = 1;
+  optional int32 vocab_size = 2;
+}
+</pre></div></div>
+<p>There are two weight matrices to be learned</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">class LossLayer : public RNNLayer {
+  ...
+ private:
+  Param* word_weight_, *class_weight_;
+}
+</pre></div></div>
+<p>The ComputeFeature function computes the two probabilities respectively.</p>
+<p><tt>$$P(C_{w_{t+1}}|w_t) = Softmax(w_t * class\_weight_)$$</tt> <tt>$$P(w_{t+1}|C_{w_{t+1}}) = Softmax(w_t * word\_weight[class\_start:class\_end])$$</tt></p>
+<p><tt>$w_t$</tt> is the feature from the hidden layer for the k-th word, its ground truth next word is <tt>$w_{t+1}$</tt>. The first equation computes the probability distribution over all classes for the next word. The second equation computes the probability distribution over the words in the ground truth class for the next word.</p>
+<p>The ComputeGradient function computes the gradient of the source layer (i.e., the hidden layer) and the two weight matrices.</p></div></div>
+<div class="section">
+<h3><a name="Updater_Configuration"></a>Updater Configuration</h3>
+<p>We employ kFixedStep type of the learning rate change method and the configuration is as follows. We decay the learning rate once the performance does not increase on the validation dataset.</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">updater{
+  type: kSGD
+  learning_rate {
+    type: kFixedStep
+    fixedstep_conf:{
+      step:0
+      step:48810
+      step:56945
+      step:65080
+      step:73215
+      step_lr:0.1
+      step_lr:0.05
+      step_lr:0.025
+      step_lr:0.0125
+      step_lr:0.00625
+    }
+  }
+}
+</pre></div></div></div>
+<div class="section">
+<h3><a name="TrainOneBatch_Function"></a>TrainOneBatch() Function</h3>
+<p>We use BP (BackPropagation) algorithm to train the RNN model here. The corresponding configuration can be seen below.</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint"># In job.conf file
+train_one_batch {
+  alg: kBackPropagation
+}
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Cluster_Configuration"></a>Cluster Configuration</h3>
+<p>The default cluster configuration can be used, i.e., single worker and single server in a single process.</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>



Mime
View raw message