You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@singa.apache.org by bu...@apache.org on 2016/01/13 04:47:58 UTC
svn commit: r977575 [17/19] - in /websites/staging/singa/trunk/content: ./
community/ develop/ docs/ docs/jp/ docs/kr/ docs/zh/ releases/ v0.1.0/
Added: websites/staging/singa/trunk/content/docs/kr/programming-guide.html
==============================================================================
--- websites/staging/singa/trunk/content/docs/kr/programming-guide.html (added)
+++ websites/staging/singa/trunk/content/docs/kr/programming-guide.html Wed Jan 13 03:47:56 2016
@@ -0,0 +1,408 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-01-13
+ | 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="20160113" />
+ <meta http-equiv="Content-Language" content="en" />
+ <title>Apache SINGA – Programming Guide</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="Latest">Latest</a>
+ <ul class="dropdown-menu">
+ <li> <a href="../../docs/installation.html" title="Installation">Installation</a>
+</li>
+ <li> <a href="../../docs/programmer-guide.html" title="Programmer Guide">Programmer Guide</a>
+</li>
+ <li> <a href="../../docs/distributed-training.html" title="Distributed Training">Distributed Training</a>
+</li>
+ <li> <a href="../../docs/data.html" title="Data Preparation">Data Preparation</a>
+</li>
+ <li> <a href="../../docs/checkpoint.html" title="Checkpoint">Checkpoint</a>
+</li>
+ <li> <a href="../../docs/test.html" title="Test">Test</a>
+</li>
+ <li> <a href="../../docs/examples.html" title="Examples">Examples</a>
+</li>
+ <li> <a href="../../docs/debug.html" title="Debug">Debug</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 ">Programming Guide</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="Latest">
+ <span class="icon-chevron-right"></span>
+ Latest</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>Programming Guide</h1>
+<hr />
+<p>To submit a training job, users must provide the configuration of the four components shown in Figure 1:</p>
+
+<ul>
+
+<li>a <a href="neural-net.html">NeuralNet</a> describing the neural net structure with the detailed layer setting and their connections;</li>
+
+<li>a <a href="train-one-batch.html">TrainOneBatch</a> algorithm which is tailored for different model categories;</li>
+
+<li>an <a href="updater.html">Updater</a> defining the protocol for updating parameters at the server side;</li>
+
+<li>a <a href="distributed-training.html">Cluster Topology</a> specifying the distributed architecture of workers and servers.</li>
+</ul>
+<p>The <i>Basic user guide</i> section describes how to submit a training job using built-in components; while the <i>Advanced user guide</i> section presents details on writing user’s own main function to register components implemented by themselves. In addition, the training data must be prepared, which has the same <a href="data.html">process</a> for both advanced users and basic users.</p>
+<p><img src="../images/overview.png" align="center" width="400px" alt="" /> <span><b>Figure 1 - SINGA overview.</b></span></p>
+<div class="section">
+<h2><a name="Basic_user_guide"></a>Basic user guide</h2>
+<p>Users can use the default main function provided SINGA to submit the training job. For this case, a job configuration file written as a google protocol buffer message for the <a href="../api/classsinga_1_1JobProto.html">JobProto</a> must be provided in the command line,</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">./bin/singa-run.sh -conf <path to job conf> [-resume]
+</pre></div></div>
+<p><tt>-resume</tt> is for continuing the training from last <a href="checkpoint.html">checkpoint</a>. The <a href="mlp.html">MLP</a> and <a href="cnn.html">CNN</a> examples use built-in components. Please read the corresponding pages for their job configuration files. The subsequent pages will illustrate the details on each component of the configuration.</p></div>
+<div class="section">
+<h2><a name="Advanced_user_guide"></a>Advanced user guide</h2>
+<p>If a user’s model contains some user-defined components, e.g., <a href="updater.html">Updater</a>, he has to write a main function to register these components. It is similar to Hadoop’s main function. Generally, the main function should</p>
+
+<ul>
+
+<li>
+<p>initialize SINGA, e.g., setup logging.</p></li>
+
+<li>
+<p>register user-defined components.</p></li>
+
+<li>
+<p>create and pass the job configuration to SINGA driver</p></li>
+</ul>
+<p>An example main function is like</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">#include "singa.h"
+#include "user.h" // 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<FooLayer>(kFooLayer);
+ // register user defined updater
+ driver.RegisterUpdater<FooUpdater>(kFooUpdater);
+ ...
+ auto jobConf = driver.job_conf();
+ // update jobConf
+
+ driver.Train(resume, jobConf);
+ return 0;
+}
+</pre></div></div>
+<p>The Driver class’ <tt>Init</tt> method will load a job configuration file provided by users as a command line argument (<tt>-conf <job conf></tt>). It contains at least the cluster topology and returns the <tt>jobConf</tt> for users to update or fill in configurations of neural net, updater, etc. If users define subclasses of Layer, Updater, Worker and Param, they should register them through the driver. Finally, the job configuration is submitted to the driver which starts the training.</p>
+<p>We will provide helper functions to make the configuration easier in the future, like <a class="externalLink" href="https://github.com/fchollet/keras">keras</a>.</p>
+<p>Users need to compile and link their code (e.g., layer implementations and the main file) with SINGA library (<i>.libs/libsinga.so</i>) to generate an executable file, e.g., with name <i>mysinga</i>. To launch the program, users just pass the path of the <i>mysinga</i> and base job configuration to <i>./bin/singa-run.sh</i>.</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">./bin/singa-run.sh -conf <path to job conf> -exec <path to mysinga> [other arguments]
+</pre></div></div>
+<p>The <a href="rnn.html">RNN application</a> provides a full example of implementing the main function for training a specific RNN model.</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/docs/kr/quick-start.html
==============================================================================
--- websites/staging/singa/trunk/content/docs/kr/quick-start.html (added)
+++ websites/staging/singa/trunk/content/docs/kr/quick-start.html Wed Jan 13 03:47:56 2016
@@ -0,0 +1,409 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-01-13
+ | 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="20160113" />
+ <meta http-equiv="Content-Language" content="en" />
+ <title>Apache SINGA – íµ ì¤íí¸</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="Latest">Latest</a>
+ <ul class="dropdown-menu">
+ <li> <a href="../../docs/installation.html" title="Installation">Installation</a>
+</li>
+ <li> <a href="../../docs/programmer-guide.html" title="Programmer Guide">Programmer Guide</a>
+</li>
+ <li> <a href="../../docs/distributed-training.html" title="Distributed Training">Distributed Training</a>
+</li>
+ <li> <a href="../../docs/data.html" title="Data Preparation">Data Preparation</a>
+</li>
+ <li> <a href="../../docs/checkpoint.html" title="Checkpoint">Checkpoint</a>
+</li>
+ <li> <a href="../../docs/test.html" title="Test">Test</a>
+</li>
+ <li> <a href="../../docs/examples.html" title="Examples">Examples</a>
+</li>
+ <li> <a href="../../docs/debug.html" title="Debug">Debug</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 ">íµ ì¤íí¸</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="Latest">
+ <span class="icon-chevron-right"></span>
+ Latest</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>퀵 스타트</h1>
+<hr />
+<div class="section">
+<h2><a name="SINGA_"></a>SINGA 인스톨</h2>
+<p>SINGA 인스톨은 <a href="installation.html">여기</a>를 참조하십시오.</p>
+<div class="section">
+<h3><a name="Zookeeper_"></a>Zookeeper 실행</h3>
+<p>SINGA 트레이닝은 <a class="externalLink" href="https://zookeeper.apache.org/">zookeeper</a>를 이용합니다. 우선 zookeeper 서비스가 시작되어 있는지 확인하십시오.</p>
+<p>준비된 thirdparty 스크립트를 사용하여 zookeeper를 설치 한 경우 다음 스크립트를 실행하십시오.</p>
+<p>    #goto top level folder     cd SINGA_ROOT     ./bin/zk-service.sh start</p>
+<p>(<tt>./bin/zk-service.sh stop</tt> // zookeeper 중지).</p>
+<p>기본 포트를 사용하지 않고 zookeeper를 시작시킬 때<tt>conf / singa.conf</tt>을 편집하십시오.</p>
+<p>    zookeeper_host : “localhost : YOUR_PORT”</p></div></div>
+<div class="section">
+<h2><a name="a__"></a>독립형 모드에서 실행</h2>
+<p>독립형 모드에서 SINGA을 실행할 때, <a class="externalLink" href="http://mesos.apache.org/">Mesos</a>와 [YARN](<a class="externalLink" href="http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-">http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-</a> yarn-site / YARN.html)과 같은 클러스터 관리자 이용하지 않는 경우를 말합니다.</p>
+<div class="section">
+<h3><a name="Single__"></a>Single 노드에서의 훈련</h3>
+<p>하나의 프로세스가 출시됩니다. 예를 들어, <a class="externalLink" href="http://www.cs.toronto.edu/~kriz/cifar.html">CIFAR-10</a> 데이터 세트를 이용하여 <a class="externalLink" href="http://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks">CNN 모델</a>을 트레이닝시킵니다. 하이퍼 파라미터는 <a class="externalLink" href="https://code.google.com/p/cuda-convnet/">cuda-convnet</a>에 따라 설정되어 있습니다. 자세한 내용은 <a href="cnn.html">CNN 샘플</a> 페이지를 참조하십시오.</p>
+<div class="section">
+<h4><a name="a__"></a>데이터와 작업 설정</h4>
+<p>데이터 세트 다운로드와 Triaing이나 Test를위한 데이터 샤드의 생성은 다음과 같이 실시합니다.</p>
+<p>    cd examples / cifar10 /     cp Makefile.example Makefile     make download     make create</p>
+<p>Training과 Test 데이터 세트는 각각 * cifar10-train-shard * 그리고 * cifar10-test-shard * 폴더에 만들어집니다. 모든 이미지의 특징 평균을 묘사 한 * image_mean.bin * 파일도 생성됩니다.</p>
+<p>CNN 모델 학습에 필요한 소스 코드는 모든 SINGA에 포함되어 있습니다. 코드를 추가 할 필요가 없습니다. 작업 설정 파일 (<i>job.conf</i>) 을 지정하여 스크립트 (<i>.. / .. / bin / singa-run.sh</i>)를 실행합니다. SINGA 코드를 변경하거나 추가 할 때, 프로그래밍 가이드 (programming-guide.html)를 참조하십시오.</p></div>
+<div class="section">
+<h4><a name="a__"></a>병렬화 없이 트레이닝</h4>
+<p>Cluster Topology의 기본값은 하나의 worker와 하나의 server가 있습니다. 데이터와 신경망의 병렬 처리는되지 않습니다.</p>
+<p>훈련을 시작하려면 다음 스크립트를 실행합니다.</p>
+<p>    # goto top level folder     cd ../../     ./bin/singa-run.sh -conf examples/cifar10/job.conf</p>
+<p>현재 실행중인 작업의 목록을 보려면</p>
+<p>    ./bin/singa-console.sh list</p>
+<p>    JOB ID | NUM PROCS     ———- | ———–     24 | 1</p>
+<p>작업 종료하려면</p>
+<p>    ./bin/singa-console.sh kill JOB_ID</p>
+<p>로그 및 작업 정보 * / tmp / singa-log * 폴더에 저장됩니다. * conf / singa.conf * 파일<tt>log-dir</tt>에서 변경 가능합니다.</p></div>
+<div class="section">
+<h4><a name="a__"></a>비동기 병렬 트레이닝</h4>
+<p>    # job.conf     …     cluster {       nworker_groups : 2       nworkers_per_procs : 2       workspace : “examples/cifar10/”     }</p>
+<p>여러 worker 그룹을 출시함으로써 In SINGA, 비동기 트레이닝 (architecture.html)을 수행 할 수 있습니다. 예를 들어, <i>job.conf</i> 을 위와 같이 변경합니다. 기본적으로 하나의 worker 그룹이 하나의 worker를 갖도록 설정되어 있습니다. 위의 설정은 하나의 프로세스에 2 개의 worker가 설정되어 있기 때문에 2 개의 worker 그룹이 동일한 프로세스로 실행됩니
;다. 결과 메모리 [Downpour (frameworks.html) 트레이닝 프레임 워크로 실행됩니다.</p>
+<p>사용자는 데이터의 분산을 신경 쓸 필요는 없습니다. 랜덤 오프셋에 따라 각 worker 그룹에 데이터가 보내집니다. 각 worker는 다른 데이터 파티션을 담당합니다.</p>
+<p>    # job.conf     …     neuralnet {       layer {         …         sharddata_conf {           random_skip : 5000         }       }       …     }</p>
+<p>스크립트 실행 :</p>
+<p>    ./bin/singa-run.sh -conf examples/cifar10/job.conf</p></div>
+<div class="section">
+<h4><a name="a__"></a>동기화 병렬 트레이닝</h4>
+<p>    # job.conf     …     cluster {       nworkers_per_group : 2       nworkers_per_procs : 2       workspace : “examples/cifar10/”     }</p>
+<p>하나의 worker 그룹으로 여러 worker를 실행하여 동기 트레이닝 (architecture.html)을 수행 할 수 있습니다. 예를 들어, <i>job.conf</i> 파일을 위와 같이 변경합니다. 위의 설정은 하나의 worker 그룹에 2 개의 worker가 설정되었습니다. worker 우리는 그룹 내에서 동기화합니다. 이것은 메모리 [sandblaster (frameworks.html)로 실행됩니다. 모델은 2 개의 worker로 분할됩니다. 각 레&
#xc774;어가 2 개의 worker로 보냅니다. 배분 된 레이어는 원본 레이어와 기능은 같지만 특징 인스턴스의 수가<tt>B / g</tt>됩니다. 여기서<tt>B</tt>는 미니밧찌 인스턴스의 숫자로<tt>g</tt>는 그룹의 worker 수 있습니다. [다른 체계 (neural-net.html)를 이용한 레이어 (신경망) 파티션 방법도 있습니다.</p>
+<p>다른 설정은 모두 “병렬화 없음”의 경우와 동일합니다.</p>
+<p>    ./bin/singa-run.sh -conf examples/cifar10/job.conf</p></div></div>
+<div class="section">
+<h3><a name="a_"></a>클러스터에서의 훈련</h3>
+<p>클러스터 설정을 변경하여 위 트레이닝 프레임 워크의 확장합니다.</p>
+<p>    nworker_per_procs : 1</p>
+<p>모든 프로세스는 하나의 worker 스레드를 생성합니다. 결과 worker 우리는 다른 프로세스 (노드)에서 생성됩니다. 클러스터의 노드를 특정하려면 <i>SINGA_ROOT/conf/</i> 의 <i>hostfile</i> 의 설​​정이 필요합니다.</p>
+<p>e.g.,</p>
+<p>    logbase-a01     logbase-a02</p>
+<p>zookeeper location도 설정해야합니다.</p>
+<p>e.g.,</p>
+<p>    # conf/singa.conf     zookeeper_host : “logbase-a01”</p>
+<p>스크립트의 실행은 “Single 노드 트레이닝”과 동일합니다.</p>
+<p>    ./bin/singa-run.sh -conf examples/cifar10/job.conf</p></div></div>
+<div class="section">
+<h2><a name="Mesos_"></a>Mesos에서 실행</h2>
+
+<ul>
+
+<li>working * …</li>
+</ul></div>
+<div class="section">
+<h2><a name="a"></a>다음</h2>
+<p>SINGA 의 코드 변경 및 추가에 대한 자세한 내용은 <a href="programming-guide.html">프로그래밍 가이드</a>를 참조하십시오.</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/docs/kr/rbm.html
==============================================================================
--- websites/staging/singa/trunk/content/docs/kr/rbm.html (added)
+++ websites/staging/singa/trunk/content/docs/kr/rbm.html Wed Jan 13 03:47:56 2016
@@ -0,0 +1,641 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-01-13
+ | 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="20160113" />
+ <meta http-equiv="Content-Language" content="en" />
+ <title>Apache SINGA – RBM 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="Latest">Latest</a>
+ <ul class="dropdown-menu">
+ <li> <a href="../../docs/installation.html" title="Installation">Installation</a>
+</li>
+ <li> <a href="../../docs/programmer-guide.html" title="Programmer Guide">Programmer Guide</a>
+</li>
+ <li> <a href="../../docs/distributed-training.html" title="Distributed Training">Distributed Training</a>
+</li>
+ <li> <a href="../../docs/data.html" title="Data Preparation">Data Preparation</a>
+</li>
+ <li> <a href="../../docs/checkpoint.html" title="Checkpoint">Checkpoint</a>
+</li>
+ <li> <a href="../../docs/test.html" title="Test">Test</a>
+</li>
+ <li> <a href="../../docs/examples.html" title="Examples">Examples</a>
+</li>
+ <li> <a href="../../docs/debug.html" title="Debug">Debug</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 ">RBM 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="Latest">
+ <span class="icon-chevron-right"></span>
+ Latest</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>RBM Example</h1>
+<hr />
+<p>This example uses SINGA to train 4 RBM models and one auto-encoder model over the <a class="externalLink" href="http://yann.lecun.com/exdb/mnist/">MNIST dataset</a>. The auto-encoder model is trained to reduce the dimensionality of the MNIST image feature. The RBM models are trained to initialize parameters of the auto-encoder model. This example application is from <a class="externalLink" href="http://www.cs.toronto.edu/~hinton/science.pdf">Hinton’s science paper</a>.</p>
+<div class="section">
+<h2><a name="Running_instructions"></a>Running instructions</h2>
+<p>Running scripts are provided in <i>SINGA_ROOT/examples/rbm</i> folder.</p>
+<p>The MNIST dataset has 70,000 handwritten digit images. The <a href="data.html">data preparation</a> page has details on converting this dataset into SINGA recognizable format. Users can simply run the following commands to download and convert the dataset.</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint"># at SINGA_ROOT/examples/mnist/
+$ cp Makefile.example Makefile
+$ make download
+$ make create
+</pre></div></div>
+<p>The training is separated into two phases, namely pre-training and fine-tuning. The pre-training phase trains 4 RBMs in sequence,</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint"># at SINGA_ROOT/
+$ ./bin/singa-run.sh -conf examples/rbm/rbm1.conf
+$ ./bin/singa-run.sh -conf examples/rbm/rbm2.conf
+$ ./bin/singa-run.sh -conf examples/rbm/rbm3.conf
+$ ./bin/singa-run.sh -conf examples/rbm/rbm4.conf
+</pre></div></div>
+<p>The fine-tuning phase trains the auto-encoder by,</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">$ ./bin/singa-run.sh -conf examples/rbm/autoencoder.conf
+</pre></div></div></div>
+<div class="section">
+<h2><a name="Training_details"></a>Training details</h2>
+<div class="section">
+<h3><a name="RBM1"></a>RBM1</h3>
+<p><img src="../images/example-rbm1.png" align="center" width="200px" alt="" /> <span><b>Figure 1 - RBM1.</b></span></p>
+<p>The neural net structure for training RBM1 is shown in Figure 1. The data layer and parser layer provides features for training RBM1. The visible layer (connected with parser layer) of RBM1 accepts the image feature (784 dimension). The hidden layer is set to have 1000 neurons (units). These two layers are configured as,</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">layer{
+ name: "RBMVis"
+ type: kRBMVis
+ srclayers:"mnist"
+ srclayers:"RBMHid"
+ rbm_conf{
+ hdim: 1000
+ }
+ param{
+ name: "w1"
+ init{
+ type: kGaussian
+ mean: 0.0
+ std: 0.1
+ }
+ }
+ param{
+ name: "b11"
+ init{
+ type: kConstant
+ value: 0.0
+ }
+ }
+}
+
+layer{
+ name: "RBMHid"
+ type: kRBMHid
+ srclayers:"RBMVis"
+ rbm_conf{
+ hdim: 1000
+ }
+ param{
+ name: "w1_"
+ share_from: "w1"
+ }
+ param{
+ name: "b12"
+ init{
+ type: kConstant
+ value: 0.0
+ }
+ }
+}
+</pre></div></div>
+<p>For RBM, the weight matrix is shared by the visible and hidden layers. For instance, <tt>w1</tt> is shared by <tt>vis</tt> and <tt>hid</tt> layers shown in Figure 1. In SINGA, we can configure the <tt>share_from</tt> field to enable <a href="param.html">parameter sharing</a> as shown above for the param <tt>w1</tt> and <tt>w1_</tt>.</p>
+<p><a href="train-one-batch.html#contrastive-divergence">Contrastive Divergence</a> is configured as the algorithm for <a href="train-one-batch.html">TrainOneBatch</a>. Following Hinton’s paper, we configure the <a href="updater.html">updating protocol</a> as follows,</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint"># Updater Configuration
+updater{
+ type: kSGD
+ momentum: 0.2
+ weight_decay: 0.0002
+ learning_rate{
+ base_lr: 0.1
+ type: kFixed
+ }
+}
+</pre></div></div>
+<p>Since the parameters of RBM0 will be used to initialize the auto-encoder, we should configure the <tt>workspace</tt> field to specify a path for the checkpoint folder. For example, if we configure it as,</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">cluster {
+ workspace: "examples/rbm/rbm1/"
+}
+</pre></div></div>
+<p>Then SINGA will <a href="checkpoint.html">checkpoint the parameters</a> into <i>examples/rbm/rbm1/</i>.</p></div>
+<div class="section">
+<h3><a name="RBM1"></a>RBM1</h3>
+<p><img src="../images/example-rbm2.png" align="center" width="200px" alt="" /> <span><b>Figure 2 - RBM2.</b></span></p>
+<p>Figure 2 shows the net structure of training RBM2. The visible units of RBM2 accept the output from the Sigmoid1 layer. The Inner1 layer is a <tt>InnerProductLayer</tt> whose parameters are set to the <tt>w1</tt> and <tt>b12</tt> learned from RBM1. The neural net configuration is (with layers for data layer and parser layer omitted).</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">layer{
+ name: "Inner1"
+ type: kInnerProduct
+ srclayers:"mnist"
+ innerproduct_conf{
+ num_output: 1000
+ }
+ param{ name: "w1" }
+ param{ name: "b12"}
+}
+
+layer{
+ name: "Sigmoid1"
+ type: kSigmoid
+ srclayers:"Inner1"
+}
+
+layer{
+ name: "RBMVis"
+ type: kRBMVis
+ srclayers:"Sigmoid1"
+ srclayers:"RBMHid"
+ rbm_conf{
+ hdim: 500
+ }
+ param{
+ name: "w2"
+ ...
+ }
+ param{
+ name: "b21"
+ ...
+ }
+}
+
+layer{
+ name: "RBMHid"
+ type: kRBMHid
+ srclayers:"RBMVis"
+ rbm_conf{
+ hdim: 500
+ }
+ param{
+ name: "w2_"
+ share_from: "w2"
+ }
+ param{
+ name: "b22"
+ ...
+ }
+}
+</pre></div></div>
+<p>To load w0 and b02 from RBM0’s checkpoint file, we configure the <tt>checkpoint_path</tt> as,</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">checkpoint_path: "examples/rbm/rbm1/checkpoint/step6000-worker0"
+cluster{
+ workspace: "examples/rbm/rbm2"
+}
+</pre></div></div>
+<p>The workspace is changed for checkpointing <tt>w2</tt>, <tt>b21</tt> and <tt>b22</tt> into <i>examples/rbm/rbm2/</i>.</p></div>
+<div class="section">
+<h3><a name="RBM3"></a>RBM3</h3>
+<p><img src="../images/example-rbm3.png" align="center" width="200px" alt="" /> <span><b>Figure 3 - RBM3.</b></span></p>
+<p>Figure 3 shows the net structure of training RBM3. In this model, a layer with 250 units is added as the hidden layer of RBM3. The visible units of RBM3 accepts output from Sigmoid2 layer. Parameters of Inner1 and Innner2 are set to <tt>w1,b12,w2,b22</tt> which can be load from the checkpoint file of RBM2, i.e., “examples/rbm/rbm2/”.</p></div>
+<div class="section">
+<h3><a name="RBM4"></a>RBM4</h3>
+<p><img src="../images/example-rbm4.png" align="center" width="200px" alt="" /> <span><b>Figure 4 - RBM4.</b></span></p>
+<p>Figure 4 shows the net structure of training RBM4. It is similar to Figure 3, but according to <a class="externalLink" href="http://www.cs.toronto.edu/~hinton/science.pdf">Hinton’s science paper</a>, the hidden units of the top RBM (RBM4) have stochastic real-valued states drawn from a unit variance Gaussian whose mean is determined by the input from the RBM’s logistic visible units. So we add a <tt>gaussian</tt> field in the RBMHid layer to control the sampling distribution (Gaussian or Bernoulli). In addition, this RBM has a much smaller learning rate (0.001). The neural net configuration for the RBM4 and the updating protocol is (with layers for data layer and parser layer omitted),</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint"># Updater Configuration
+updater{
+ type: kSGD
+ momentum: 0.9
+ weight_decay: 0.0002
+ learning_rate{
+ base_lr: 0.001
+ type: kFixed
+ }
+}
+
+layer{
+ name: "RBMVis"
+ type: kRBMVis
+ srclayers:"Sigmoid3"
+ srclayers:"RBMHid"
+ rbm_conf{
+ hdim: 30
+ }
+ param{
+ name: "w4"
+ ...
+ }
+ param{
+ name: "b41"
+ ...
+ }
+}
+
+layer{
+ name: "RBMHid"
+ type: kRBMHid
+ srclayers:"RBMVis"
+ rbm_conf{
+ hdim: 30
+ gaussian: true
+ }
+ param{
+ name: "w4_"
+ share_from: "w4"
+ }
+ param{
+ name: "b42"
+ ...
+ }
+}
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Auto-encoder"></a>Auto-encoder</h3>
+<p>In the fine-tuning stage, the 4 RBMs are “unfolded” to form encoder and decoder networks that are initialized using the parameters from the previous 4 RBMs.</p>
+<p><img src="../images/example-autoencoder.png" align="center" width="500px" alt="" /> <span><b>Figure 5 - Auto-Encoders.</b></span></p>
+<p>Figure 5 shows the neural net structure for training the auto-encoder. <a href="train-one-batch.html">Back propagation (kBP)</a> is configured as the algorithm for <tt>TrainOneBatch</tt>. We use the same cluster configuration as RBM models. For updater, we use <a href="updater.html#adagradupdater">AdaGrad</a> algorithm with fixed learning rate.</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">### Updater Configuration
+updater{
+ type: kAdaGrad
+ learning_rate{
+ base_lr: 0.01
+ type: kFixed
+ }
+}
+</pre></div></div>
+<p>According to <a class="externalLink" href="http://www.cs.toronto.edu/~hinton/science.pdf">Hinton’s science paper</a>, we configure a EuclideanLoss layer to compute the reconstruction error. The neural net configuration is (with some of the middle layers omitted),</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">layer{ name: "data" }
+layer{ name:"mnist" }
+layer{
+ name: "Inner1"
+ param{ name: "w1" }
+ param{ name: "b12" }
+}
+layer{ name: "Sigmoid1" }
+...
+layer{
+ name: "Inner8"
+ innerproduct_conf{
+ num_output: 784
+ transpose: true
+ }
+ param{
+ name: "w8"
+ share_from: "w1"
+ }
+ param{ name: "b11" }
+}
+layer{ name: "Sigmoid8" }
+
+# Euclidean Loss Layer Configuration
+layer{
+ name: "loss"
+ type:kEuclideanLoss
+ srclayers:"Sigmoid8"
+ srclayers:"mnist"
+}
+</pre></div></div>
+<p>To load pre-trained parameters from the 4 RBMs’ checkpoint file we configure <tt>checkpoint_path</tt> as</p>
+
+<div class="source">
+<div class="source"><pre class="prettyprint">### Checkpoint Configuration
+checkpoint_path: "examples/rbm/checkpoint/rbm1/checkpoint/step6000-worker0"
+checkpoint_path: "examples/rbm/checkpoint/rbm2/checkpoint/step6000-worker0"
+checkpoint_path: "examples/rbm/checkpoint/rbm3/checkpoint/step6000-worker0"
+checkpoint_path: "examples/rbm/checkpoint/rbm4/checkpoint/step6000-worker0"
+</pre></div></div></div></div>
+<div class="section">
+<h2><a name="Visualization_Results"></a>Visualization Results</h2>
+
+<div>
+<img src="../images/rbm-weight.PNG" align="center" width="300px" alt="" />
+
+<img src="../images/rbm-feature.PNG" align="center" width="300px" alt="" />
+<br />
+<span><b>Figure 6 - Bottom RBM weight matrix.</b></span>
+ 
+ 
+ 
+ 
+
+<span><b>Figure 7 - Top layer features.</b></span>
+</div>
+<p>Figure 6 visualizes sample columns of the weight matrix of RBM1, We can see the Gabor-like filters are learned. Figure 7 depicts the features extracted from the top-layer of the auto-encoder, wherein one point represents one image. Different colors represent different digits. We can see that most images are well clustered according to the ground truth.</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>