You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@singa.apache.org by wa...@apache.org on 2017/02/25 15:30:35 UTC

svn commit: r1784386 [10/19] - in /incubator/singa/site/trunk: en/ en/_sources/ en/_sources/community/ en/_sources/develop/ en/_sources/docs/ en/_sources/docs/model_zoo/ en/_sources/docs/model_zoo/caffe/ en/_sources/docs/model_zoo/char-rnn/ en/_sources...

Modified: incubator/singa/site/trunk/en/docs/layer.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/layer.html?rev=1784386&r1=1784385&r2=1784386&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/layer.html (original)
+++ incubator/singa/site/trunk/en/docs/layer.html Sat Feb 25 15:30:33 2017
@@ -31,6 +31,9 @@
   
 
   
+        <link rel="index" title="Index"
+              href="../genindex.html"/>
+        <link rel="search" title="Search" href="../search.html"/>
     <link rel="top" title="incubator-singa 1.1.0 documentation" href="../index.html"/>
         <link rel="up" title="Documentation" href="index.html"/>
         <link rel="next" title="FeedForward Net" href="net.html"/>
@@ -95,7 +98,7 @@
 <li class="toctree-l2"><a class="reference internal" href="software_stack.html">Software Stack</a></li>
 <li class="toctree-l2"><a class="reference internal" href="device.html">Device</a></li>
 <li class="toctree-l2"><a class="reference internal" href="tensor.html">Tensor</a></li>
-<li class="toctree-l2 current"><a class="current reference internal" href="">Layer</a><ul>
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Layer</a><ul>
 <li class="toctree-l3"><a class="reference internal" href="#module-singa.layer">Python API</a></li>
 <li class="toctree-l3"><a class="reference internal" href="#cpp-api">CPP API</a></li>
 </ul>
@@ -177,9 +180,9 @@
 <span id="python-api"></span><h2>Python API<a class="headerlink" href="#module-singa.layer" title="Permalink to this headline">¶</a></h2>
 <p>Python layers wrap the C++ layers to provide simpler construction APIs.</p>
 <p>Example usages:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">singa</span> <span class="kn">import</span> <span class="n">layer</span>
-<span class="kn">from</span> <span class="nn">singa</span> <span class="kn">import</span> <span class="n">tensor</span>
-<span class="kn">from</span> <span class="nn">singa</span> <span class="kn">import</span> <span class="n">device</span>
+<div class="highlight-default"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">singa</span> <span class="k">import</span> <span class="n">layer</span>
+<span class="kn">from</span> <span class="nn">singa</span> <span class="k">import</span> <span class="n">tensor</span>
+<span class="kn">from</span> <span class="nn">singa</span> <span class="k">import</span> <span class="n">device</span>
 
 <span class="n">layer</span><span class="o">.</span><span class="n">engine</span> <span class="o">=</span> <span class="s1">&#39;cudnn&#39;</span>  <span class="c1"># to use cudnn layers</span>
 <span class="n">dev</span> <span class="o">=</span> <span class="n">device</span><span class="o">.</span><span class="n">create_cuda_gpu</span><span class="p">()</span>
@@ -189,7 +192,7 @@
 <span class="n">conv</span><span class="o">.</span><span class="n">to_device</span><span class="p">(</span><span class="n">dev</span><span class="p">)</span>  <span class="c1"># move the layer data onto a CudaGPU device</span>
 <span class="n">x</span> <span class="o">=</span> <span class="n">tensor</span><span class="o">.</span><span class="n">Tensor</span><span class="p">((</span><span class="mi">3</span><span class="p">,</span> <span class="mi">32</span><span class="p">,</span> <span class="mi">32</span><span class="p">),</span> <span class="n">dev</span><span class="p">)</span>
 <span class="n">x</span><span class="o">.</span><span class="n">uniform</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
-<span class="n">y</span> <span class="o">=</span> <span class="n">conv</span><span class="o">.</span><span class="n">foward</span><span class="p">(</span><span class="bp">True</span><span class="p">,</span> <span class="n">x</span><span class="p">)</span>
+<span class="n">y</span> <span class="o">=</span> <span class="n">conv</span><span class="o">.</span><span class="n">foward</span><span class="p">(</span><span class="kc">True</span><span class="p">,</span> <span class="n">x</span><span class="p">)</span>
 
 <span class="n">dy</span> <span class="o">=</span> <span class="n">tensor</span><span class="o">.</span><span class="n">Tensor</span><span class="p">()</span>
 <span class="n">dy</span><span class="o">.</span><span class="n">reset_like</span><span class="p">(</span><span class="n">y</span><span class="p">)</span>
@@ -318,7 +321,7 @@ which would result in inconsistency.</p>
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
 <li><strong>flag</strong> &#8211; True (kTrain) for training (kEval); False for evaluating;
 other values for furture use.</li>
-<li><strong>x</strong> (<em>Tensor or list&lt;Tensor&gt;</em>) &#8211; an input tensor if the layer is
+<li><strong>x</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a><em> or </em><em>list&lt;Tensor&gt;</em>) &#8211; an input tensor if the layer is
 connected from a single layer; a list of tensors if the layer
 is connected from multiple layers.</li>
 </ul>
@@ -342,7 +345,7 @@ tensors if the layer is connected to mul
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
 <li><strong>flag</strong> (<em>int</em>) &#8211; for future use.</li>
-<li><strong>dy</strong> (<em>Tensor or list&lt;Tensor&gt;</em>) &#8211; the gradient tensor(s) y w.r.t the
+<li><strong>dy</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a><em> or </em><em>list&lt;Tensor&gt;</em>) &#8211; the gradient tensor(s) y w.r.t the
 objective loss</li>
 </ul>
 </td>
@@ -711,7 +714,8 @@ inputs should be the same.</td>
 <dd><p>Merge all input tensors by summation.</p>
 <p>TODO(wangwei) do element-wise merge operations, e.g., avg, count
 :param flag: not used.
-:param inputs: a list of tensors</p>
+:param inputs: a list of tensors
+:type inputs: list</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
@@ -860,8 +864,12 @@ feature size.</li>
 </ul>
 </td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">&lt;dx, []&gt;, dx is a list tensors for the gradient of the inputs; []
-is an empty list.</p>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
+<dt>&lt;dx, []&gt;, dx is a list tensors for the gradient of the inputs; []</dt>
+<dd><p class="first last">is an empty list.</p>
+</dd>
+</dl>
+</p>
 </td>
 </tr>
 </tbody>
@@ -930,8 +938,12 @@ points for n sub-tensors;</li>
 </ul>
 </td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a single tensor for the gradient of the original user, and an empty
-list.</p>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
+<dt>a single tensor for the gradient of the original user, and an empty</dt>
+<dd><p class="first last">list.</p>
+</dd>
+</dl>
+</p>
 </td>
 </tr>
 </tbody>
@@ -979,7 +991,7 @@ feature size.</li>
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
 <li><strong>flag</strong> &#8211; True(kTrain) for training; False(kEval) for evaluation;
 others values for future use.</li>
-<li><strong>&lt;x1, x2,...xn, hx, cx&gt;, where xi is the input tensor for the</strong> (<em>inputs,</em>) &#8211; i-th position, its shape is (batch_size, input_feature_length);
+<li><strong>&lt;x1</strong><strong>, </strong><strong>x2</strong><strong>,</strong><strong>..xn</strong><strong>, </strong><strong>hx</strong><strong>, </strong><strong>cx&gt;</strong><strong>, </strong><strong>where xi is the input tensor for the</strong> (<em>inputs</em><em>,</em><em></em>) &#8211; i-th position, its shape is (batch_size, input_feature_length);
 the batch_size of xi must &gt;= that of xi+1; hx is the initial
 hidden state of shape (num_stacks * bidirection?2:1, batch_size,
 hidden_size). cx is the initial cell state tensor of the same
@@ -989,11 +1001,15 @@ data.</li>
 </ul>
 </td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">&lt;y1, y2, ... yn, hy, cy&gt;, where yi is the output tensor for the i-th
-position, its shape is (batch_size,
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
+<dt>&lt;y1, y2, ... yn, hy, cy&gt;, where yi is the output tensor for the i-th</dt>
+<dd><p class="first last">position, its shape is (batch_size,
 hidden_size * bidirection?2:1). hy is the final hidden state
 tensor. cx is the final cell state tensor. cx is only used for
 lstm.</p>
+</dd>
+</dl>
+</p>
 </td>
 </tr>
 </tbody>
@@ -1009,9 +1025,9 @@ lstm.</p>
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>for future use.</strong> (<em>flag,</em>) &#8211; </li>
-<li><strong>&lt;dy1, dy2,...dyn, dhy, dcy&gt;, where dyi is the gradient for the</strong> (<em>grad,</em>) &#8211; </li>
-<li><strong>output, its shape is (batch_size, hidden_size*bidirection?2</strong> (<em>i-th</em>) &#8211; 1);
+<li><strong>for future use.</strong> (<em>flag</em><em>,</em><em></em>) &#8211; </li>
+<li><strong>&lt;dy1</strong><strong>, </strong><strong>dy2</strong><strong>,</strong><strong>..dyn</strong><strong>, </strong><strong>dhy</strong><strong>, </strong><strong>dcy&gt;</strong><strong>, </strong><strong>where dyi is the gradient for the</strong> (<em>grad</em><em>,</em><em></em>) &#8211; </li>
+<li><strong>output</strong><strong>, </strong><strong>its shape is</strong><strong> (</strong><strong>batch_size</strong><strong>, </strong><strong>hidden_size*bidirection?2</strong> (<em>i-th</em>) &#8211; 1);
 dhy is the gradient for the final hidden state, its shape is
 (num_stacks * bidirection?2:1, batch_size,
 hidden_size). dcy is the gradient for the final cell state.
@@ -1021,11 +1037,15 @@ data.</li>
 </ul>
 </td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">&lt;dx1, dx2, ... dxn, dhx, dcx&gt;, where dxi is the gradient tensor for
-the i-th input, its shape is (batch_size,
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
+<dt>&lt;dx1, dx2, ... dxn, dhx, dcx&gt;, where dxi is the gradient tensor for</dt>
+<dd><p class="first last">the i-th input, its shape is (batch_size,
 input_feature_length). dhx is the gradient for the initial
 hidden state. dcx is the gradient for the initial cell state,
 which is valid only for lstm.</p>
+</dd>
+</dl>
+</p>
 </td>
 </tr>
 </tbody>

Modified: incubator/singa/site/trunk/en/docs/loss.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/loss.html?rev=1784386&r1=1784385&r2=1784386&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/loss.html (original)
+++ incubator/singa/site/trunk/en/docs/loss.html Sat Feb 25 15:30:33 2017
@@ -31,6 +31,9 @@
   
 
   
+        <link rel="index" title="Index"
+              href="../genindex.html"/>
+        <link rel="search" title="Search" href="../search.html"/>
     <link rel="top" title="incubator-singa 1.1.0 documentation" href="../index.html"/>
         <link rel="up" title="Documentation" href="index.html"/>
         <link rel="next" title="Metric" href="metric.html"/>
@@ -98,7 +101,7 @@
 <li class="toctree-l2"><a class="reference internal" href="layer.html">Layer</a></li>
 <li class="toctree-l2"><a class="reference internal" href="net.html">FeedForward Net</a></li>
 <li class="toctree-l2"><a class="reference internal" href="initializer.html">Initializer</a></li>
-<li class="toctree-l2 current"><a class="current reference internal" href="">Loss</a></li>
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Loss</a></li>
 <li class="toctree-l2"><a class="reference internal" href="metric.html">Metric</a></li>
 <li class="toctree-l2"><a class="reference internal" href="optimizer.html">Optimizer</a></li>
 <li class="toctree-l2"><a class="reference internal" href="data.html">Data</a></li>
@@ -173,15 +176,15 @@
 from C++ implementation, and the rest are implemented directly using python
 Tensor.</p>
 <p>Example usage:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">singa</span> <span class="kn">import</span> <span class="n">tensor</span>
-<span class="kn">from</span> <span class="nn">singa</span> <span class="kn">import</span> <span class="n">loss</span>
+<div class="highlight-default"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">singa</span> <span class="k">import</span> <span class="n">tensor</span>
+<span class="kn">from</span> <span class="nn">singa</span> <span class="k">import</span> <span class="n">loss</span>
 
 <span class="n">x</span> <span class="o">=</span> <span class="n">tensor</span><span class="o">.</span><span class="n">Tensor</span><span class="p">((</span><span class="mi">3</span><span class="p">,</span> <span class="mi">5</span><span class="p">))</span>
 <span class="n">x</span><span class="o">.</span><span class="n">uniform</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>  <span class="c1"># randomly genearte the prediction activation</span>
 <span class="n">y</span> <span class="o">=</span> <span class="n">tensor</span><span class="o">.</span><span class="n">from_numpy</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">],</span> <span class="n">dtype</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">int</span><span class="p">))</span>  <span class="c1"># set the truth</span>
 
 <span class="n">f</span> <span class="o">=</span> <span class="n">loss</span><span class="o">.</span><span class="n">SoftmaxCrossEntropy</span><span class="p">()</span>
-<span class="n">l</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">forward</span><span class="p">(</span><span class="bp">True</span><span class="p">,</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span>  <span class="c1"># l is tensor with 3 loss values</span>
+<span class="n">l</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">forward</span><span class="p">(</span><span class="kc">True</span><span class="p">,</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span>  <span class="c1"># l is tensor with 3 loss values</span>
 <span class="n">g</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">backward</span><span class="p">()</span>  <span class="c1"># g is a tensor containing all gradients of x w.r.t l</span>
 </pre></div>
 </div>

Modified: incubator/singa/site/trunk/en/docs/metric.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/metric.html?rev=1784386&r1=1784385&r2=1784386&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/metric.html (original)
+++ incubator/singa/site/trunk/en/docs/metric.html Sat Feb 25 15:30:33 2017
@@ -31,6 +31,9 @@
   
 
   
+        <link rel="index" title="Index"
+              href="../genindex.html"/>
+        <link rel="search" title="Search" href="../search.html"/>
     <link rel="top" title="incubator-singa 1.1.0 documentation" href="../index.html"/>
         <link rel="up" title="Documentation" href="index.html"/>
         <link rel="next" title="Optimizer" href="optimizer.html"/>
@@ -99,7 +102,7 @@
 <li class="toctree-l2"><a class="reference internal" href="net.html">FeedForward Net</a></li>
 <li class="toctree-l2"><a class="reference internal" href="initializer.html">Initializer</a></li>
 <li class="toctree-l2"><a class="reference internal" href="loss.html">Loss</a></li>
-<li class="toctree-l2 current"><a class="current reference internal" href="">Metric</a></li>
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Metric</a></li>
 <li class="toctree-l2"><a class="reference internal" href="optimizer.html">Optimizer</a></li>
 <li class="toctree-l2"><a class="reference internal" href="data.html">Data</a></li>
 <li class="toctree-l2"><a class="reference internal" href="image_tool.html">Image Tool</a></li>
@@ -173,8 +176,8 @@
 performance. The specific metric classes could be converted from C++
 implmentation or implemented directly using Python.</p>
 <p>Example usage:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">singa</span> <span class="kn">import</span> <span class="n">tensor</span>
-<span class="kn">from</span> <span class="nn">singa</span> <span class="kn">import</span> <span class="n">metric</span>
+<div class="highlight-default"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">singa</span> <span class="k">import</span> <span class="n">tensor</span>
+<span class="kn">from</span> <span class="nn">singa</span> <span class="k">import</span> <span class="n">metric</span>
 
 <span class="n">x</span> <span class="o">=</span> <span class="n">tensor</span><span class="o">.</span><span class="n">Tensor</span><span class="p">((</span><span class="mi">3</span><span class="p">,</span> <span class="mi">5</span><span class="p">))</span>
 <span class="n">x</span><span class="o">.</span><span class="n">uniform</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>  <span class="c1"># randomly genearte the prediction activation</span>

Modified: incubator/singa/site/trunk/en/docs/model_zoo/caffe/README.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/model_zoo/caffe/README.html?rev=1784386&r1=1784385&r2=1784386&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/model_zoo/caffe/README.html (original)
+++ incubator/singa/site/trunk/en/docs/model_zoo/caffe/README.html Sat Feb 25 15:30:33 2017
@@ -31,6 +31,9 @@
   
 
   
+        <link rel="index" title="Index"
+              href="../../../genindex.html"/>
+        <link rel="search" title="Search" href="../../../search.html"/>
     <link rel="top" title="incubator-singa 1.1.0 documentation" href="../../../index.html"/>
     <link href="../../../_static/style.css" rel="stylesheet" type="text/css">
 
@@ -169,12 +172,12 @@ binary file.</li>
 <div class="section" id="predict">
 <span id="predict"></span><h3>Predict<a class="headerlink" href="#predict" title="Permalink to this headline">¶</a></h3>
 <p>The <code class="docutils literal"><span class="pre">predict.py</span></code> script creates the VGG model and read the parameters,</p>
-<div class="highlight-python"><div class="highlight"><pre>usage: predict.py [-h] model_txt model_bin imgclass
+<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">usage</span><span class="p">:</span> <span class="n">predict</span><span class="o">.</span><span class="n">py</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="n">model_txt</span> <span class="n">model_bin</span> <span class="n">imgclass</span>
 </pre></div>
 </div>
 <p>where <code class="docutils literal"><span class="pre">imgclass</span></code> refers to the synsets of imagenet dataset for vgg models.
 You can start the prediction program by executing the following command:</p>
-<div class="highlight-python"><div class="highlight"><pre>python predict.py vgg16.prototxt vgg16.caffemodel synset_words.txt
+<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="n">predict</span><span class="o">.</span><span class="n">py</span> <span class="n">vgg16</span><span class="o">.</span><span class="n">prototxt</span> <span class="n">vgg16</span><span class="o">.</span><span class="n">caffemodel</span> <span class="n">synset_words</span><span class="o">.</span><span class="n">txt</span>
 </pre></div>
 </div>
 <p>Then you type in the image path, and the program would output the top-5 labels.</p>

Modified: incubator/singa/site/trunk/en/docs/model_zoo/char-rnn/README.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/model_zoo/char-rnn/README.html?rev=1784386&r1=1784385&r2=1784386&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/model_zoo/char-rnn/README.html (original)
+++ incubator/singa/site/trunk/en/docs/model_zoo/char-rnn/README.html Sat Feb 25 15:30:33 2017
@@ -31,6 +31,9 @@
   
 
   
+        <link rel="index" title="Index"
+              href="../../../genindex.html"/>
+        <link rel="search" title="Search" href="../../../search.html"/>
     <link rel="top" title="incubator-singa 1.1.0 documentation" href="../../../index.html"/>
         <link rel="up" title="Model Zoo" href="../index.html"/>
         <link rel="next" title="Train AlexNet over ImageNet" href="../imagenet/alexnet/README.html"/>
@@ -108,7 +111,7 @@
 <li class="toctree-l2"><a class="reference internal" href="../../utils.html">Utils</a></li>
 <li class="toctree-l2 current"><a class="reference internal" href="../index.html">Model Zoo</a><ul class="current">
 <li class="toctree-l3"><a class="reference internal" href="../cifar10/README.html">Train CNN over Cifar-10</a></li>
-<li class="toctree-l3 current"><a class="current reference internal" href="">Train Char-RNN over plain text</a><ul>
+<li class="toctree-l3 current"><a class="current reference internal" href="#">Train Char-RNN over plain text</a><ul>
 <li class="toctree-l4"><a class="reference internal" href="#instructions">Instructions</a></li>
 </ul>
 </li>
@@ -197,16 +200,16 @@ generate meaningful code from the model.
 Other plain text files can also be used.</p>
 </li>
 <li><p class="first">Start the training,</p>
-<div class="highlight-python"><div class="highlight"><pre>  python train.py linux_input.txt
+<div class="highlight-default"><div class="highlight"><pre><span></span>  <span class="n">python</span> <span class="n">train</span><span class="o">.</span><span class="n">py</span> <span class="n">linux_input</span><span class="o">.</span><span class="n">txt</span>
 </pre></div>
 </div>
 <p>Some hyper-parameters could be set through command line,</p>
-<div class="highlight-python"><div class="highlight"><pre>  python train.py -h
+<div class="highlight-default"><div class="highlight"><pre><span></span>  <span class="n">python</span> <span class="n">train</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">h</span>
 </pre></div>
 </div>
 </li>
 <li><p class="first">Sample characters from the model by providing the number of characters to sample and the seed string.</p>
-<div class="highlight-python"><div class="highlight"><pre>  python sample.py &#39;model.bin&#39; 100 --seed &#39;#include &lt;std&#39;
+<div class="highlight-default"><div class="highlight"><pre><span></span>  <span class="n">python</span> <span class="n">sample</span><span class="o">.</span><span class="n">py</span> <span class="s1">&#39;model.bin&#39;</span> <span class="mi">100</span> <span class="o">--</span><span class="n">seed</span> <span class="s1">&#39;#include &lt;std&#39;</span>
 </pre></div>
 </div>
 <p>Please replace &#8216;model.bin&#8217; with the path to one of the checkpoint paths.</p>

Modified: incubator/singa/site/trunk/en/docs/model_zoo/cifar10/README.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/model_zoo/cifar10/README.html?rev=1784386&r1=1784385&r2=1784386&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/model_zoo/cifar10/README.html (original)
+++ incubator/singa/site/trunk/en/docs/model_zoo/cifar10/README.html Sat Feb 25 15:30:33 2017
@@ -31,6 +31,9 @@
   
 
   
+        <link rel="index" title="Index"
+              href="../../../genindex.html"/>
+        <link rel="search" title="Search" href="../../../search.html"/>
     <link rel="top" title="incubator-singa 1.1.0 documentation" href="../../../index.html"/>
         <link rel="up" title="Model Zoo" href="../index.html"/>
         <link rel="next" title="Train Char-RNN over plain text" href="../char-rnn/README.html"/>
@@ -107,7 +110,7 @@
 <li class="toctree-l2"><a class="reference internal" href="../../converter.html">Caffe Converter</a></li>
 <li class="toctree-l2"><a class="reference internal" href="../../utils.html">Utils</a></li>
 <li class="toctree-l2 current"><a class="reference internal" href="../index.html">Model Zoo</a><ul class="current">
-<li class="toctree-l3 current"><a class="current reference internal" href="">Train CNN over Cifar-10</a><ul>
+<li class="toctree-l3 current"><a class="current reference internal" href="#">Train CNN over Cifar-10</a><ul>
 <li class="toctree-l4"><a class="reference internal" href="#instructions">Instructions</a></li>
 </ul>
 </li>
@@ -201,11 +204,11 @@ are required. Please refer to the instal
 <div class="section" id="data-preparation">
 <span id="data-preparation"></span><h3>Data preparation<a class="headerlink" href="#data-preparation" title="Permalink to this headline">¶</a></h3>
 <p>The binary Cifar-10 dataset could be downloaded by</p>
-<div class="highlight-python"><div class="highlight"><pre>python download_data.py bin
+<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="n">download_data</span><span class="o">.</span><span class="n">py</span> <span class="nb">bin</span>
 </pre></div>
 </div>
 <p>The Python version could be downloaded by</p>
-<div class="highlight-python"><div class="highlight"><pre>python download_data.py py
+<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="n">download_data</span><span class="o">.</span><span class="n">py</span> <span class="n">py</span>
 </pre></div>
 </div>
 </div>
@@ -215,26 +218,26 @@ are required. Please refer to the instal
 <ol>
 <li><p class="first">train.py. The following command would train the VGG model using the python
 version of the Cifar-10 dataset in &#8216;cifar-10-batches-py&#8217; folder.</p>
-<div class="highlight-python"><div class="highlight"><pre> python train.py vgg cifar-10-batches-py
+<div class="highlight-default"><div class="highlight"><pre><span></span> <span class="n">python</span> <span class="n">train</span><span class="o">.</span><span class="n">py</span> <span class="n">vgg</span> <span class="n">cifar</span><span class="o">-</span><span class="mi">10</span><span class="o">-</span><span class="n">batches</span><span class="o">-</span><span class="n">py</span>
 </pre></div>
 </div>
 <p>To train other models, please replace &#8216;vgg&#8217; to &#8216;alexnet&#8217;, &#8216;resnet&#8217; or &#8216;caffe&#8217;,
 where &#8216;caffe&#8217; refers to the alexnet model converted from Caffe. By default
 the training would run on a CudaGPU device, to run it on CppCPU, add an additional
 argument</p>
-<div class="highlight-python"><div class="highlight"><pre> python train.py vgg cifar-10-batches-py  --use_cpu
+<div class="highlight-default"><div class="highlight"><pre><span></span> <span class="n">python</span> <span class="n">train</span><span class="o">.</span><span class="n">py</span> <span class="n">vgg</span> <span class="n">cifar</span><span class="o">-</span><span class="mi">10</span><span class="o">-</span><span class="n">batches</span><span class="o">-</span><span class="n">py</span>  <span class="o">--</span><span class="n">use_cpu</span>
 </pre></div>
 </div>
 </li>
 <li><p class="first">alexnet.cc. It trains the AlexNet model using the CPP APIs on a CudaGPU,</p>
-<div class="highlight-python"><div class="highlight"><pre> ./run.sh
+<div class="highlight-default"><div class="highlight"><pre><span></span> <span class="o">./</span><span class="n">run</span><span class="o">.</span><span class="n">sh</span>
 </pre></div>
 </div>
 </li>
 <li><p class="first">alexnet-parallel.cc. It trains the AlexNet model using the CPP APIs on two CudaGPU devices.
 The two devices run synchronously to compute the gradients of the mode parameters, which are
 averaged on the host CPU device and then be applied to update the parameters.</p>
-<div class="highlight-python"><div class="highlight"><pre> ./run-parallel.sh
+<div class="highlight-default"><div class="highlight"><pre><span></span> <span class="o">./</span><span class="n">run</span><span class="o">-</span><span class="n">parallel</span><span class="o">.</span><span class="n">sh</span>
 </pre></div>
 </div>
 </li>
@@ -245,7 +248,7 @@ averaged on the host CPU device and then
 <div class="section" id="prediction">
 <span id="prediction"></span><h3>Prediction<a class="headerlink" href="#prediction" title="Permalink to this headline">¶</a></h3>
 <p>predict.py includes the prediction function</p>
-<div class="highlight-python"><div class="highlight"><pre>    def predict(net, images, dev, topk=5)
+<div class="highlight-default"><div class="highlight"><pre><span></span>    <span class="k">def</span> <span class="nf">predict</span><span class="p">(</span><span class="n">net</span><span class="p">,</span> <span class="n">images</span><span class="p">,</span> <span class="n">dev</span><span class="p">,</span> <span class="n">topk</span><span class="o">=</span><span class="mi">5</span><span class="p">)</span>
 </pre></div>
 </div>
 <p>The net is created by loading the previously trained model; Images consist of
@@ -253,7 +256,7 @@ a numpy array of images (one row per ima
 a CudaGPU device or the host CppCPU device; It returns the topk labels for each instance.</p>
 <p>The predict.py file&#8217;s main function provides an example of using the pre-trained alexnet model to do prediction for new images.
 The &#8216;model.bin&#8217; file generated by the training program should be placed at the cifar10 folder to run</p>
-<div class="highlight-python"><div class="highlight"><pre>    python predict.py
+<div class="highlight-default"><div class="highlight"><pre><span></span>    <span class="n">python</span> <span class="n">predict</span><span class="o">.</span><span class="n">py</span>
 </pre></div>
 </div>
 </div>

Modified: incubator/singa/site/trunk/en/docs/model_zoo/imagenet/alexnet/README.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/model_zoo/imagenet/alexnet/README.html?rev=1784386&r1=1784385&r2=1784386&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/model_zoo/imagenet/alexnet/README.html (original)
+++ incubator/singa/site/trunk/en/docs/model_zoo/imagenet/alexnet/README.html Sat Feb 25 15:30:33 2017
@@ -31,6 +31,9 @@
   
 
   
+        <link rel="index" title="Index"
+              href="../../../../genindex.html"/>
+        <link rel="search" title="Search" href="../../../../search.html"/>
     <link rel="top" title="incubator-singa 1.1.0 documentation" href="../../../../index.html"/>
         <link rel="up" title="Model Zoo" href="../../index.html"/>
         <link rel="next" title="Image Classification using GoogleNet" href="../googlenet/README.html"/>
@@ -109,7 +112,7 @@
 <li class="toctree-l2 current"><a class="reference internal" href="../../index.html">Model Zoo</a><ul class="current">
 <li class="toctree-l3"><a class="reference internal" href="../../cifar10/README.html">Train CNN over Cifar-10</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../../char-rnn/README.html">Train Char-RNN over plain text</a></li>
-<li class="toctree-l3 current"><a class="current reference internal" href="">Train AlexNet over ImageNet</a><ul>
+<li class="toctree-l3 current"><a class="current reference internal" href="#">Train AlexNet over ImageNet</a><ul>
 <li class="toctree-l4"><a class="reference internal" href="#instructions">Instructions</a></li>
 </ul>
 </li>
@@ -207,7 +210,7 @@ or from <a class="reference external" hr
 <ul>
 <li><p class="first">Assuming you have downloaded the data and the list.
 Now we should transform the data into binary files. You can run:</p>
-<div class="highlight-python"><div class="highlight"><pre>    sh create_data.sh
+<div class="highlight-default"><div class="highlight"><pre><span></span>    <span class="n">sh</span> <span class="n">create_data</span><span class="o">.</span><span class="n">sh</span>
 </pre></div>
 </div>
 <p>The script will generate a test file(<code class="docutils literal"><span class="pre">test.bin</span></code>), a mean file(<code class="docutils literal"><span class="pre">mean.bin</span></code>) and
@@ -230,7 +233,7 @@ The script will generate these files in
 <span id="training"></span><h3>Training<a class="headerlink" href="#training" title="Permalink to this headline">¶</a></h3>
 <ul>
 <li><p class="first">After preparing data, you can run the following command to train the Alexnet model.</p>
-<div class="highlight-python"><div class="highlight"><pre>    sh run.sh
+<div class="highlight-default"><div class="highlight"><pre><span></span>    <span class="n">sh</span> <span class="n">run</span><span class="o">.</span><span class="n">sh</span>
 </pre></div>
 </div>
 </li>

Modified: incubator/singa/site/trunk/en/docs/model_zoo/imagenet/googlenet/README.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/model_zoo/imagenet/googlenet/README.html?rev=1784386&r1=1784385&r2=1784386&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/model_zoo/imagenet/googlenet/README.html (original)
+++ incubator/singa/site/trunk/en/docs/model_zoo/imagenet/googlenet/README.html Sat Feb 25 15:30:33 2017
@@ -31,6 +31,9 @@
   
 
   
+        <link rel="index" title="Index"
+              href="../../../../genindex.html"/>
+        <link rel="search" title="Search" href="../../../../search.html"/>
     <link rel="top" title="incubator-singa 1.1.0 documentation" href="../../../../index.html"/>
         <link rel="up" title="Model Zoo" href="../../index.html"/>
         <link rel="next" title="Development Schedule" href="../../../../develop/schedule.html"/>
@@ -110,7 +113,7 @@
 <li class="toctree-l3"><a class="reference internal" href="../../cifar10/README.html">Train CNN over Cifar-10</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../../char-rnn/README.html">Train Char-RNN over plain text</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../alexnet/README.html">Train AlexNet over ImageNet</a></li>
-<li class="toctree-l3 current"><a class="current reference internal" href="">Image Classification using GoogleNet</a><ul>
+<li class="toctree-l3 current"><a class="current reference internal" href="#">Image Classification using GoogleNet</a><ul>
 <li class="toctree-l4"><a class="reference internal" href="#instructions">Instructions</a></li>
 <li class="toctree-l4"><a class="reference internal" href="#details">Details</a></li>
 </ul>
@@ -194,13 +197,13 @@ license: unrestricted https://github.com
 <span id="instructions"></span><h2>Instructions<a class="headerlink" href="#instructions" title="Permalink to this headline">¶</a></h2>
 <ul>
 <li><p class="first">Download the parameter checkpoint file into this folder</p>
-<div class="highlight-python"><div class="highlight"><pre>  $ wget https://s3-ap-southeast-1.amazonaws.com/dlfile/bvlc_googlenet.tar.gz
+<div class="highlight-default"><div class="highlight"><pre><span></span>  $ wget https://s3-ap-southeast-1.amazonaws.com/dlfile/bvlc_googlenet.tar.gz
   $ tar xvf bvlc_googlenet.tar.gz
 </pre></div>
 </div>
 </li>
 <li><p class="first">Run the program</p>
-<div class="highlight-python"><div class="highlight"><pre>  # use cpu
+<div class="highlight-default"><div class="highlight"><pre><span></span>  # use cpu
   $ python serve.py -C &amp;
   # use gpu
   $ python serve.py &amp;
@@ -208,7 +211,7 @@ license: unrestricted https://github.com
 </div>
 </li>
 <li><p class="first">Submit images for classification</p>
-<div class="highlight-python"><div class="highlight"><pre>  $ curl -i -F image=@image1.jpg http://localhost:9999/api
+<div class="highlight-default"><div class="highlight"><pre><span></span>  $ curl -i -F image=@image1.jpg http://localhost:9999/api
   $ curl -i -F image=@image2.jpg http://localhost:9999/api
   $ curl -i -F image=@image3.jpg http://localhost:9999/api
 </pre></div>
@@ -221,10 +224,10 @@ license: unrestricted https://github.com
 <span id="details"></span><h2>Details<a class="headerlink" href="#details" title="Permalink to this headline">¶</a></h2>
 <p>We first extract the parameter values from <a class="reference external" href="http://dl.caffe.berkeleyvision.org/bvlc_googlenet.caffemodel">Caffe&#8217;s checkpoint file</a> into a pickle version
 After downloading the checkpoint file into <code class="docutils literal"><span class="pre">caffe_root/python</span></code> folder, run the following script</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c1"># to be executed within caffe_root/python folder</span>
+<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># to be executed within caffe_root/python folder</span>
 <span class="kn">import</span> <span class="nn">caffe</span>
-<span class="kn">import</span> <span class="nn">numpy</span> <span class="kn">as</span> <span class="nn">np</span>
-<span class="kn">import</span> <span class="nn">cPickle</span> <span class="kn">as</span> <span class="nn">pickle</span>
+<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
+<span class="kn">import</span> <span class="nn">cPickle</span> <span class="k">as</span> <span class="nn">pickle</span>
 
 <span class="n">model_def</span> <span class="o">=</span> <span class="s1">&#39;../models/bvlc_googlenet/deploy.prototxt&#39;</span>
 <span class="n">weight</span> <span class="o">=</span> <span class="s1">&#39;bvlc_googlenet.caffemodel&#39;</span>  <span class="c1"># must be downloaded at first</span>
@@ -236,7 +239,7 @@ After downloading the checkpoint file in
     <span class="n">bias</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">copy</span><span class="p">(</span><span class="n">net</span><span class="o">.</span><span class="n">params</span><span class="p">[</span><span class="n">layer_name</span><span class="p">][</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">data</span><span class="p">)</span>
     <span class="n">params</span><span class="p">[</span><span class="n">layer_name</span><span class="o">+</span><span class="s1">&#39;_weight&#39;</span><span class="p">]</span><span class="o">=</span><span class="n">weights</span>
     <span class="n">params</span><span class="p">[</span><span class="n">layer_name</span><span class="o">+</span><span class="s1">&#39;_bias&#39;</span><span class="p">]</span><span class="o">=</span><span class="n">bias</span>
-    <span class="k">print</span> <span class="n">layer_name</span><span class="p">,</span> <span class="n">weights</span><span class="o">.</span><span class="n">shape</span><span class="p">,</span> <span class="n">bias</span><span class="o">.</span><span class="n">shape</span>
+    <span class="nb">print</span> <span class="n">layer_name</span><span class="p">,</span> <span class="n">weights</span><span class="o">.</span><span class="n">shape</span><span class="p">,</span> <span class="n">bias</span><span class="o">.</span><span class="n">shape</span>
 
 <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="s1">&#39;bvlc_googlenet.pickle&#39;</span><span class="p">,</span> <span class="s1">&#39;wb&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">fd</span><span class="p">:</span>
     <span class="n">pickle</span><span class="o">.</span><span class="n">dump</span><span class="p">(</span><span class="n">params</span><span class="p">,</span> <span class="n">fd</span><span class="p">)</span>

Added: incubator/singa/site/trunk/en/docs/model_zoo/imagenet/resnet/README.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/model_zoo/imagenet/resnet/README.html?rev=1784386&view=auto
==============================================================================
--- incubator/singa/site/trunk/en/docs/model_zoo/imagenet/resnet/README.html (added)
+++ incubator/singa/site/trunk/en/docs/model_zoo/imagenet/resnet/README.html Sat Feb 25 15:30:33 2017
@@ -0,0 +1,301 @@
+
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>Image Classification using Residual Networks &mdash; incubator-singa 1.1.0 documentation</title>
+  
+
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  
+  
+    <link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
+  
+
+  
+
+  
+        <link rel="index" title="Index"
+              href="../../../../genindex.html"/>
+        <link rel="search" title="Search" href="../../../../search.html"/>
+    <link rel="top" title="incubator-singa 1.1.0 documentation" href="../../../../index.html"/>
+    <link href="../../../../_static/style.css" rel="stylesheet" type="text/css">
+
+
+  
+  <script src="../../../../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav" role="document">
+
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search">
+          
+
+          
+            <a href="../../../../index.html" class="icon icon-home"> incubator-singa
+          
+
+          
+            
+            <img src="../../../../_static/singa.png" class="logo" />
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                latest
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+                <ul>
+<li class="toctree-l1"><a class="reference internal" href="../../../../downloads.html">Download SINGA</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../index.html">Documentation</a></li>
+</ul>
+<p class="caption"><span class="caption-text">Development</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../../../../develop/schedule.html">Development Schedule</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../develop/how-contribute.html">How to Contribute to SINGA</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../develop/contribute-code.html">How to Contribute Code</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../develop/contribute-docs.html">How to Contribute to Documentation</a></li>
+</ul>
+<p class="caption"><span class="caption-text">Community</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../../../../community/source-repository.html">Source Repository</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../community/mail-lists.html">Project Mailing Lists</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../community/issue-tracking.html">Issue Tracking</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../community/team-list.html">The SINGA Team</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
+        <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+        <a href="../../../../index.html">incubator-singa</a>
+      </nav>
+
+
+      
+      <div class="wy-nav-content">
+        <div class="rst-content">
+          
+
+ 
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+  <ul class="wy-breadcrumbs">
+    <li><a href="../../../../index.html">Docs</a> &raquo;</li>
+      
+    <li>Image Classification using Residual Networks</li>
+      <li class="wy-breadcrumbs-aside">
+        
+          
+        
+      </li>
+  </ul>
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <hr class="docutils" />
+<p>name: Resnets on ImageNet
+SINGA version: 1.1
+SINGA commit: 45ec92d8ffc1fa1385a9307fdf07e21da939ee2f
+parameter_url: https://s3-ap-southeast-1.amazonaws.com/dlfile/resnet/resnet-18.tar.gz
+license: Apache V2, https://github.com/facebook/fb.resnet.torch/blob/master/LICENSE</p>
+<hr class="docutils" />
+<div class="section" id="image-classification-using-residual-networks">
+<span id="image-classification-using-residual-networks"></span><h1>Image Classification using Residual Networks<a class="headerlink" href="#image-classification-using-residual-networks" title="Permalink to this headline">¶</a></h1>
+<p>In this example, we convert Residual Networks trained on <a class="reference external" href="https://github.com/facebook/fb.resnet.torch">Torch</a> to SINGA for image classification.</p>
+<div class="section" id="instructions">
+<span id="instructions"></span><h2>Instructions<a class="headerlink" href="#instructions" title="Permalink to this headline">¶</a></h2>
+<ul>
+<li><p class="first">Download one parameter checkpoint file (see below) and the synset word file of ImageNet into this folder, e.g.,</p>
+<div class="highlight-default"><div class="highlight"><pre><span></span>  $ wget https://s3-ap-southeast-1.amazonaws.com/dlfile/resnet/resnet-18.tar.gz
+  $ wget https://s3-ap-southeast-1.amazonaws.com/dlfile/resnet/synset_words.txt
+  $ tar xvf resnet-18.tar.gz
+</pre></div>
+</div>
+</li>
+<li><p class="first">Usage</p>
+<div class="highlight-default"><div class="highlight"><pre><span></span>  $ python serve.py -h
+</pre></div>
+</div>
+</li>
+<li><p class="first">Example</p>
+<div class="highlight-default"><div class="highlight"><pre><span></span>  # use cpu
+  $ python serve.py --use_cpu --parameter_file resnet-18.pickle --model resnet --depth 18 &amp;
+  # use gpu
+  $ python serve.py --parameter_file resnet-18.pickle --model resnet --depth 18 &amp;
+</pre></div>
+</div>
+<p>The parameter files for the following model and depth configuration pairs are provided:</p>
+<ul class="simple">
+<li>resnet (original resnet), <a class="reference external" href="https://s3-ap-southeast-1.amazonaws.com/dlfile/resnet/resnet-101.tar.gz">18</a>|<a class="reference external" href="https://s3-ap-southeast-1.amazonaws.com/dlfile/resnet/resnet-34.tar.gz">34</a>|<a class="reference external" href="https://s3-ap-southeast-1.amazonaws.com/dlfile/resnet/resnet-101.tar.gz">101</a>|<a class="reference external" href="https://s3-ap-southeast-1.amazonaws.com/dlfile/resnet/resnet-152.tar.gz">152</a></li>
+<li>addbn (resnet with a batch normalization layer after the addition), <a class="reference external" href="https://s3-ap-southeast-1.amazonaws.com/dlfile/resnet/resnet-50.tar.gz">50</a></li>
+<li>wrn (wide resnet), <a class="reference external" href="https://s3-ap-southeast-1.amazonaws.com/dlfile/resnet/wrn-50-2.tar.gz">50</a></li>
+<li>preact (resnet with pre-activation) <a class="reference external" href="https://s3-ap-southeast-1.amazonaws.com/dlfile/resnet/resnet-200.tar.gz">200</a></li>
+</ul>
+</li>
+<li><p class="first">Submit images for classification</p>
+<div class="highlight-default"><div class="highlight"><pre><span></span>  $ curl -i -F image=@image1.jpg http://localhost:9999/api
+  $ curl -i -F image=@image2.jpg http://localhost:9999/api
+  $ curl -i -F image=@image3.jpg http://localhost:9999/api
+</pre></div>
+</div>
+</li>
+</ul>
+<p>image1.jpg, image2.jpg and image3.jpg should be downloaded before executing the above commands.</p>
+</div>
+<div class="section" id="details">
+<span id="details"></span><h2>Details<a class="headerlink" href="#details" title="Permalink to this headline">¶</a></h2>
+<p>The parameter files were extracted from the original <a class="reference external" href="https://github.com/facebook/fb.resnet.torch/tree/master/pretrained">torch files</a> via
+the convert.py program.</p>
+<p>Usage:</p>
+<div class="highlight-default"><div class="highlight"><pre><span></span>$ python convert.py -h
+</pre></div>
+</div>
+</div>
+</div>
+
+
+           </div>
+          </div>
+          <footer>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2017 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>
+  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../../../../',
+            VERSION:'1.1.0',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true
+        };
+    </script>
+      <script type="text/javascript" src="../../../../_static/jquery.js"></script>
+      <script type="text/javascript" src="../../../../_static/underscore.js"></script>
+      <script type="text/javascript" src="../../../../_static/doctools.js"></script>
+
+  
+
+  
+  
+    <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
+  
+
+  
+  
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.StickyNav.enable();
+      });
+  </script>
+  
+
+<div class="rst-versions shift-up" data-toggle="rst-versions" role="note" aria-label="versions">
+  <span class="rst-current-version" data-toggle="rst-current-version">
+    <span class="fa fa-book"> incubator-singa </span>
+    v: latest
+    <span class="fa fa-caret-down"></span>
+  </span>
+  <div class="rst-other-versions">
+      <dl>
+          <dt>Languages</dt>
+          <dd><a href="../../../../../en/index.html">English</a></dd>
+          <dd><a href="../../../../../zh/index.html">中文</a></dd>
+      </dl>
+      <dl>
+          <dt>Versions</dt>
+          <dd><a href="http://singa.apache.org/v0.3.0/">0.3</a></dd>
+          <dd><a href="http://singa.apache.org/v1.1.0/">1.1</a></dd>
+      </dl>
+
+  </div>
+  <a href="http://incubator.apache.org/"> <img src= "../../../../_static/apache.jpg"> </a>
+</div>
+
+ <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>
+
+ 
+
+
+</body>
+</html>
\ No newline at end of file

Modified: incubator/singa/site/trunk/en/docs/model_zoo/index.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/model_zoo/index.html?rev=1784386&r1=1784385&r2=1784386&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/model_zoo/index.html (original)
+++ incubator/singa/site/trunk/en/docs/model_zoo/index.html Sat Feb 25 15:30:33 2017
@@ -31,6 +31,9 @@
   
 
   
+        <link rel="index" title="Index"
+              href="../../genindex.html"/>
+        <link rel="search" title="Search" href="../../search.html"/>
     <link rel="top" title="incubator-singa 1.1.0 documentation" href="../../index.html"/>
         <link rel="up" title="Documentation" href="../index.html"/>
         <link rel="next" title="Train CNN over Cifar-10" href="cifar10/README.html"/>
@@ -106,7 +109,7 @@
 <li class="toctree-l2"><a class="reference internal" href="../snapshot.html">Snapshot</a></li>
 <li class="toctree-l2"><a class="reference internal" href="../converter.html">Caffe Converter</a></li>
 <li class="toctree-l2"><a class="reference internal" href="../utils.html">Utils</a></li>
-<li class="toctree-l2 current"><a class="current reference internal" href="">Model Zoo</a><ul>
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Model Zoo</a><ul>
 <li class="toctree-l3"><a class="reference internal" href="cifar10/README.html">Train CNN over Cifar-10</a></li>
 <li class="toctree-l3"><a class="reference internal" href="char-rnn/README.html">Train Char-RNN over plain text</a></li>
 <li class="toctree-l3"><a class="reference internal" href="imagenet/alexnet/README.html">Train AlexNet over ImageNet</a></li>

Modified: incubator/singa/site/trunk/en/docs/model_zoo/mnist/README.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/model_zoo/mnist/README.html?rev=1784386&r1=1784385&r2=1784386&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/model_zoo/mnist/README.html (original)
+++ incubator/singa/site/trunk/en/docs/model_zoo/mnist/README.html Sat Feb 25 15:30:33 2017
@@ -31,6 +31,9 @@
   
 
   
+        <link rel="index" title="Index"
+              href="../../../genindex.html"/>
+        <link rel="search" title="Search" href="../../../search.html"/>
     <link rel="top" title="incubator-singa 1.1.0 documentation" href="../../../index.html"/>
     <link href="../../../_static/style.css" rel="stylesheet" type="text/css">
 
@@ -155,14 +158,14 @@ MNIST dataset. The RBM model and its hyp
 <li><p class="first">Download the pre-processed <a class="reference external" href="https://github.com/mnielsen/neural-networks-and-deep-learning/raw/master/data/mnist.pkl.gz">MNIST dataset</a></p>
 </li>
 <li><p class="first">Start the training</p>
-<div class="highlight-python"><div class="highlight"><pre> python train.py mnist.pkl.gz
+<div class="highlight-default"><div class="highlight"><pre><span></span> <span class="n">python</span> <span class="n">train</span><span class="o">.</span><span class="n">py</span> <span class="n">mnist</span><span class="o">.</span><span class="n">pkl</span><span class="o">.</span><span class="n">gz</span>
 </pre></div>
 </div>
 </li>
 </ol>
 <p>By default the training code would run on CPU. To run it on a GPU card, please start
 the program with an additional argument</p>
-<div class="highlight-python"><div class="highlight"><pre>    python train.py mnist.pkl.gz --use_gpu
+<div class="highlight-default"><div class="highlight"><pre><span></span>    <span class="n">python</span> <span class="n">train</span><span class="o">.</span><span class="n">py</span> <span class="n">mnist</span><span class="o">.</span><span class="n">pkl</span><span class="o">.</span><span class="n">gz</span> <span class="o">--</span><span class="n">use_gpu</span>
 </pre></div>
 </div>
 </div>

Modified: incubator/singa/site/trunk/en/docs/net.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/net.html?rev=1784386&r1=1784385&r2=1784386&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/net.html (original)
+++ incubator/singa/site/trunk/en/docs/net.html Sat Feb 25 15:30:33 2017
@@ -31,6 +31,9 @@
   
 
   
+        <link rel="index" title="Index"
+              href="../genindex.html"/>
+        <link rel="search" title="Search" href="../search.html"/>
     <link rel="top" title="incubator-singa 1.1.0 documentation" href="../index.html"/>
         <link rel="up" title="Documentation" href="index.html"/>
         <link rel="next" title="Initializer" href="initializer.html"/>
@@ -96,7 +99,7 @@
 <li class="toctree-l2"><a class="reference internal" href="device.html">Device</a></li>
 <li class="toctree-l2"><a class="reference internal" href="tensor.html">Tensor</a></li>
 <li class="toctree-l2"><a class="reference internal" href="layer.html">Layer</a></li>
-<li class="toctree-l2 current"><a class="current reference internal" href="">FeedForward Net</a></li>
+<li class="toctree-l2 current"><a class="current reference internal" href="#">FeedForward Net</a></li>
 <li class="toctree-l2"><a class="reference internal" href="initializer.html">Initializer</a></li>
 <li class="toctree-l2"><a class="reference internal" href="loss.html">Loss</a></li>
 <li class="toctree-l2"><a class="reference internal" href="metric.html">Metric</a></li>
@@ -172,11 +175,11 @@
 <p>Nerual net class for constructing the nets using layers and providing access
 functions for net info, e.g., parameters.</p>
 <p>Example usages:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">singa</span> <span class="kn">import</span> <span class="n">net</span> <span class="k">as</span> <span class="n">ffnet</span>
-<span class="kn">from</span> <span class="nn">singa</span> <span class="kn">import</span> <span class="n">metric</span>
-<span class="kn">from</span> <span class="nn">singa</span> <span class="kn">import</span> <span class="n">loss</span>
-<span class="kn">from</span> <span class="nn">singa</span> <span class="kn">import</span> <span class="n">layer</span>
-<span class="kn">from</span> <span class="nn">singa</span> <span class="kn">import</span> <span class="n">device</span>
+<div class="highlight-default"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">singa</span> <span class="k">import</span> <span class="n">net</span> <span class="k">as</span> <span class="n">ffnet</span>
+<span class="kn">from</span> <span class="nn">singa</span> <span class="k">import</span> <span class="n">metric</span>
+<span class="kn">from</span> <span class="nn">singa</span> <span class="k">import</span> <span class="n">loss</span>
+<span class="kn">from</span> <span class="nn">singa</span> <span class="k">import</span> <span class="n">layer</span>
+<span class="kn">from</span> <span class="nn">singa</span> <span class="k">import</span> <span class="n">device</span>
 
 <span class="c1"># create net and add layers</span>
 <span class="n">net</span> <span class="o">=</span> <span class="n">ffnet</span><span class="o">.</span><span class="n">FeedForwardNet</span><span class="p">(</span><span class="n">loss</span><span class="o">.</span><span class="n">SoftmaxCrossEntropy</span><span class="p">(),</span> <span class="n">metric</span><span class="o">.</span><span class="n">Accuracy</span><span class="p">())</span>
@@ -203,7 +206,7 @@ functions for net info, e.g., parameters
 <span class="n">x</span> <span class="o">=</span> <span class="n">tensor</span><span class="o">.</span><span class="n">Tensor</span><span class="p">((</span><span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">32</span><span class="p">,</span> <span class="mi">32</span><span class="p">),</span> <span class="n">dev</span><span class="p">)</span>
 <span class="n">x</span><span class="o">.</span><span class="n">uniform</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
 <span class="n">y</span> <span class="o">=</span> <span class="n">net</span><span class="o">.</span><span class="n">predict</span><span class="p">(</span><span class="n">x</span><span class="p">)</span>
-<span class="k">print</span> <span class="n">tensor</span><span class="o">.</span><span class="n">to_numpy</span><span class="p">(</span><span class="n">y</span><span class="p">)</span>
+<span class="nb">print</span> <span class="n">tensor</span><span class="o">.</span><span class="n">to_numpy</span><span class="p">(</span><span class="n">y</span><span class="p">)</span>
 </pre></div>
 </div>
 <dl class="class">

Modified: incubator/singa/site/trunk/en/docs/neural-net.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/neural-net.html?rev=1784386&r1=1784385&r2=1784386&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/neural-net.html (original)
+++ incubator/singa/site/trunk/en/docs/neural-net.html Sat Feb 25 15:30:33 2017
@@ -31,6 +31,9 @@
   
 
   
+        <link rel="index" title="Index"
+              href="../genindex.html"/>
+        <link rel="search" title="Search" href="../search.html"/>
     <link rel="top" title="incubator-singa 1.1.0 documentation" href="../index.html"/>
     <link href="../_static/style.css" rel="stylesheet" type="text/css">
 
@@ -167,33 +170,33 @@ category.</p>
 </div><p>Feed-forward models, e.g., CNN and MLP, can easily get configured as their layer
 connections are undirected without circles. The
 configuration for the MLP model shown in Figure 1 is as follows,</p>
-<div class="highlight-python"><div class="highlight"><pre>net {
-  layer {
-    name : &#39;data&quot;
-    type : kData
-  }
-  layer {
-    name : &#39;image&quot;
-    type : kImage
-    srclayer: &#39;data&#39;
-  }
-  layer {
-    name : &#39;label&quot;
-    type : kLabel
-    srclayer: &#39;data&#39;
-  }
-  layer {
-    name : &#39;hidden&quot;
-    type : kHidden
-    srclayer: &#39;image&#39;
-  }
-  layer {
-    name : &#39;softmax&quot;
-    type : kSoftmaxLoss
-    srclayer: &#39;hidden&#39;
-    srclayer: &#39;label&#39;
-  }
-}
+<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">net</span> <span class="p">{</span>
+  <span class="n">layer</span> <span class="p">{</span>
+    <span class="n">name</span> <span class="p">:</span> <span class="s1">&#39;data&quot;</span>
+    <span class="nb">type</span> <span class="p">:</span> <span class="n">kData</span>
+  <span class="p">}</span>
+  <span class="n">layer</span> <span class="p">{</span>
+    <span class="n">name</span> <span class="p">:</span> <span class="s1">&#39;image&quot;</span>
+    <span class="nb">type</span> <span class="p">:</span> <span class="n">kImage</span>
+    <span class="n">srclayer</span><span class="p">:</span> <span class="s1">&#39;data&#39;</span>
+  <span class="p">}</span>
+  <span class="n">layer</span> <span class="p">{</span>
+    <span class="n">name</span> <span class="p">:</span> <span class="s1">&#39;label&quot;</span>
+    <span class="nb">type</span> <span class="p">:</span> <span class="n">kLabel</span>
+    <span class="n">srclayer</span><span class="p">:</span> <span class="s1">&#39;data&#39;</span>
+  <span class="p">}</span>
+  <span class="n">layer</span> <span class="p">{</span>
+    <span class="n">name</span> <span class="p">:</span> <span class="s1">&#39;hidden&quot;</span>
+    <span class="nb">type</span> <span class="p">:</span> <span class="n">kHidden</span>
+    <span class="n">srclayer</span><span class="p">:</span> <span class="s1">&#39;image&#39;</span>
+  <span class="p">}</span>
+  <span class="n">layer</span> <span class="p">{</span>
+    <span class="n">name</span> <span class="p">:</span> <span class="s1">&#39;softmax&quot;</span>
+    <span class="nb">type</span> <span class="p">:</span> <span class="n">kSoftmaxLoss</span>
+    <span class="n">srclayer</span><span class="p">:</span> <span class="s1">&#39;hidden&#39;</span>
+    <span class="n">srclayer</span><span class="p">:</span> <span class="s1">&#39;label&#39;</span>
+  <span class="p">}</span>
+<span class="p">}</span>
 </pre></div>
 </div>
 </div>
@@ -208,25 +211,25 @@ connections, as shown in Figure 3a. In o
 layer field should include each other&#8217;s name.
 The full <a class="reference external" href="rbm.html">RBM example</a> has
 detailed neural net configuration for a RBM model, which looks like</p>
-<div class="highlight-python"><div class="highlight"><pre>net {
-  layer {
-    name : &quot;vis&quot;
-    type : kVisLayer
-    param {
-      name : &quot;w1&quot;
-    }
-    srclayer: &quot;hid&quot;
-  }
-  layer {
-    name : &quot;hid&quot;
-    type : kHidLayer
-    param {
-      name : &quot;w2&quot;
-      share_from: &quot;w1&quot;
-    }
-    srclayer: &quot;vis&quot;
-  }
-}
+<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">net</span> <span class="p">{</span>
+  <span class="n">layer</span> <span class="p">{</span>
+    <span class="n">name</span> <span class="p">:</span> <span class="s2">&quot;vis&quot;</span>
+    <span class="nb">type</span> <span class="p">:</span> <span class="n">kVisLayer</span>
+    <span class="n">param</span> <span class="p">{</span>
+      <span class="n">name</span> <span class="p">:</span> <span class="s2">&quot;w1&quot;</span>
+    <span class="p">}</span>
+    <span class="n">srclayer</span><span class="p">:</span> <span class="s2">&quot;hid&quot;</span>
+  <span class="p">}</span>
+  <span class="n">layer</span> <span class="p">{</span>
+    <span class="n">name</span> <span class="p">:</span> <span class="s2">&quot;hid&quot;</span>
+    <span class="nb">type</span> <span class="p">:</span> <span class="n">kHidLayer</span>
+    <span class="n">param</span> <span class="p">{</span>
+      <span class="n">name</span> <span class="p">:</span> <span class="s2">&quot;w2&quot;</span>
+      <span class="n">share_from</span><span class="p">:</span> <span class="s2">&quot;w1&quot;</span>
+    <span class="p">}</span>
+    <span class="n">srclayer</span><span class="p">:</span> <span class="s2">&quot;vis&quot;</span>
+  <span class="p">}</span>
+<span class="p">}</span>
 </pre></div>
 </div>
 </div>
@@ -248,10 +251,10 @@ layers except the data layer, loss layer
 redundant configurations for the shared layers, users can uses the <code class="docutils literal"><span class="pre">exclude</span></code>
 filed to filter a layer in the neural net, e.g., the following layer will be
 filtered when creating the testing <code class="docutils literal"><span class="pre">NeuralNet</span></code>.</p>
-<div class="highlight-python"><div class="highlight"><pre>layer {
-  ...
-  exclude : kTest # filter this layer for creating test net
-}
+<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">layer</span> <span class="p">{</span>
+  <span class="o">...</span>
+  <span class="n">exclude</span> <span class="p">:</span> <span class="n">kTest</span> <span class="c1"># filter this layer for creating test net</span>
+<span class="p">}</span>
 </pre></div>
 </div>
 </div>
@@ -284,32 +287,32 @@ partitioned into two sub-layers.</p>
 <li><p class="first">Partitioning each singe layer into sub-layers on batch dimension (see
 below). It is enabled by configuring the partition dimension of the layer to
 0, e.g.,</p>
-<div class="highlight-python"><div class="highlight"><pre> # with other fields omitted
- layer {
-   partition_dim: 0
- }
+<div class="highlight-default"><div class="highlight"><pre><span></span> <span class="c1"># with other fields omitted</span>
+ <span class="n">layer</span> <span class="p">{</span>
+   <span class="n">partition_dim</span><span class="p">:</span> <span class="mi">0</span>
+ <span class="p">}</span>
 </pre></div>
 </div>
 </li>
 <li><p class="first">Partitioning each singe layer into sub-layers on feature dimension (see
 below).  It is enabled by configuring the partition dimension of the layer to
 1, e.g.,</p>
-<div class="highlight-python"><div class="highlight"><pre> # with other fields omitted
- layer {
-   partition_dim: 1
- }
+<div class="highlight-default"><div class="highlight"><pre><span></span> <span class="c1"># with other fields omitted</span>
+ <span class="n">layer</span> <span class="p">{</span>
+   <span class="n">partition_dim</span><span class="p">:</span> <span class="mi">1</span>
+ <span class="p">}</span>
 </pre></div>
 </div>
 </li>
 <li><p class="first">Partitioning all layers into different subsets. It is enabled by
 configuring the location ID of a layer, e.g.,</p>
-<div class="highlight-python"><div class="highlight"><pre> # with other fields omitted
- layer {
-   location: 1
- }
- layer {
-   location: 0
- }
+<div class="highlight-default"><div class="highlight"><pre><span></span> <span class="c1"># with other fields omitted</span>
+ <span class="n">layer</span> <span class="p">{</span>
+   <span class="n">location</span><span class="p">:</span> <span class="mi">1</span>
+ <span class="p">}</span>
+ <span class="n">layer</span> <span class="p">{</span>
+   <span class="n">location</span><span class="p">:</span> <span class="mi">0</span>
+ <span class="p">}</span>
 </pre></div>
 </div>
 </li>
@@ -319,21 +322,21 @@ configuring the location ID of a layer,
 useful for large models. An example application is to implement the
 <a class="reference external" href="http://arxiv.org/abs/1404.5997">idea proposed by Alex</a>.
 Hybrid partitioning is configured like,</p>
-<div class="highlight-python"><div class="highlight"><pre> # with other fields omitted
- layer {
-   location: 1
- }
- layer {
-   location: 0
- }
- layer {
-   partition_dim: 0
-   location: 0
- }
- layer {
-   partition_dim: 1
-   location: 0
- }
+<div class="highlight-default"><div class="highlight"><pre><span></span> <span class="c1"># with other fields omitted</span>
+ <span class="n">layer</span> <span class="p">{</span>
+   <span class="n">location</span><span class="p">:</span> <span class="mi">1</span>
+ <span class="p">}</span>
+ <span class="n">layer</span> <span class="p">{</span>
+   <span class="n">location</span><span class="p">:</span> <span class="mi">0</span>
+ <span class="p">}</span>
+ <span class="n">layer</span> <span class="p">{</span>
+   <span class="n">partition_dim</span><span class="p">:</span> <span class="mi">0</span>
+   <span class="n">location</span><span class="p">:</span> <span class="mi">0</span>
+ <span class="p">}</span>
+ <span class="n">layer</span> <span class="p">{</span>
+   <span class="n">partition_dim</span><span class="p">:</span> <span class="mi">1</span>
+   <span class="n">location</span><span class="p">:</span> <span class="mi">0</span>
+ <span class="p">}</span>
 </pre></div>
 </div>
 </li>
@@ -366,7 +369,7 @@ gradients will be averaged by the stub o
 <span id="advanced-user-guide"></span><h2>Advanced user guide<a class="headerlink" href="#advanced-user-guide" title="Permalink to this headline">¶</a></h2>
 <div class="section" id="creation">
 <span id="creation"></span><h3>Creation<a class="headerlink" href="#creation" title="Permalink to this headline">¶</a></h3>
-<div class="highlight-python"><div class="highlight"><pre>static NeuralNet* NeuralNet::Create(const NetProto&amp; np, Phase phase, int num);
+<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">static</span> <span class="n">NeuralNet</span><span class="o">*</span> <span class="n">NeuralNet</span><span class="p">::</span><span class="n">Create</span><span class="p">(</span><span class="n">const</span> <span class="n">NetProto</span><span class="o">&amp;</span> <span class="n">np</span><span class="p">,</span> <span class="n">Phase</span> <span class="n">phase</span><span class="p">,</span> <span class="nb">int</span> <span class="n">num</span><span class="p">);</span>
 </pre></div>
 </div>
 <p>The above function creates a <code class="docutils literal"><span class="pre">NeuralNet</span></code> for a given phase, and returns a
@@ -379,23 +382,23 @@ function takes in the full net configura
 validation and test.  It removes layers for phases other than the specified
 phase based on the <code class="docutils literal"><span class="pre">exclude</span></code> field in
 <a class="reference external" href="layer.html">layer configuration</a>:</p>
-<div class="highlight-python"><div class="highlight"><pre>layer {
-  ...
-  exclude : kTest # filter this layer for creating test net
-}
+<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">layer</span> <span class="p">{</span>
+  <span class="o">...</span>
+  <span class="n">exclude</span> <span class="p">:</span> <span class="n">kTest</span> <span class="c1"># filter this layer for creating test net</span>
+<span class="p">}</span>
 </pre></div>
 </div>
 <p>The filtered net configuration is passed to the constructor of <code class="docutils literal"><span class="pre">NeuralNet</span></code>:</p>
-<div class="highlight-python"><div class="highlight"><pre>NeuralNet::NeuralNet(NetProto netproto, int npartitions);
+<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">NeuralNet</span><span class="p">::</span><span class="n">NeuralNet</span><span class="p">(</span><span class="n">NetProto</span> <span class="n">netproto</span><span class="p">,</span> <span class="nb">int</span> <span class="n">npartitions</span><span class="p">);</span>
 </pre></div>
 </div>
 <p>The constructor creates a graph representing the net structure firstly in</p>
-<div class="highlight-python"><div class="highlight"><pre>Graph* NeuralNet::CreateGraph(const NetProto&amp; netproto, int npartitions);
+<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Graph</span><span class="o">*</span> <span class="n">NeuralNet</span><span class="p">::</span><span class="n">CreateGraph</span><span class="p">(</span><span class="n">const</span> <span class="n">NetProto</span><span class="o">&amp;</span> <span class="n">netproto</span><span class="p">,</span> <span class="nb">int</span> <span class="n">npartitions</span><span class="p">);</span>
 </pre></div>
 </div>
 <p>Next, it creates a layer for each node and connects layers if their nodes are
 connected.</p>
-<div class="highlight-python"><div class="highlight"><pre>void NeuralNet::CreateNetFromGraph(Graph* graph, int npartitions);
+<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">void</span> <span class="n">NeuralNet</span><span class="p">::</span><span class="n">CreateNetFromGraph</span><span class="p">(</span><span class="n">Graph</span><span class="o">*</span> <span class="n">graph</span><span class="p">,</span> <span class="nb">int</span> <span class="n">npartitions</span><span class="p">);</span>
 </pre></div>
 </div>
 <p>Since the <code class="docutils literal"><span class="pre">NeuralNet</span></code> instance may be shared among multiple workers, the
@@ -407,12 +410,12 @@ connected.</p>
 is enabled by first sharing the Param configuration (in <code class="docutils literal"><span class="pre">NeuralNet::Create</span></code>)
 to create two similar (e.g., the same shape) Param objects, and then calling
 (in <code class="docutils literal"><span class="pre">NeuralNet::CreateNetFromGraph</span></code>),</p>
-<div class="highlight-python"><div class="highlight"><pre>void Param::ShareFrom(const Param&amp; from);
+<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">void</span> <span class="n">Param</span><span class="p">::</span><span class="n">ShareFrom</span><span class="p">(</span><span class="n">const</span> <span class="n">Param</span><span class="o">&amp;</span> <span class="n">from</span><span class="p">);</span>
 </pre></div>
 </div>
 <p>It is also possible to share <code class="docutils literal"><span class="pre">Param</span></code>s of two nets, e.g., sharing parameters of
 the training net and the test net,</p>
-<div class="highlight-python"><div class="highlight"><pre>void NeuralNet:ShareParamsFrom(NeuralNet* other);
+<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">void</span> <span class="n">NeuralNet</span><span class="p">:</span><span class="n">ShareParamsFrom</span><span class="p">(</span><span class="n">NeuralNet</span><span class="o">*</span> <span class="n">other</span><span class="p">);</span>
 </pre></div>
 </div>
 <p>It will call <code class="docutils literal"><span class="pre">Param::ShareFrom</span></code> for each Param object.</p>
@@ -421,10 +424,10 @@ the training net and the test net,</p>
 <span id="access-functions"></span><h3>Access functions<a class="headerlink" href="#access-functions" title="Permalink to this headline">¶</a></h3>
 <p><code class="docutils literal"><span class="pre">NeuralNet</span></code> provides a couple of access function to get the layers and params
 of the net:</p>
-<div class="highlight-python"><div class="highlight"><pre>const std::vector&lt;Layer*&gt;&amp; layers() const;
-const std::vector&lt;Param*&gt;&amp; params() const ;
-Layer* name2layer(string name) const;
-Param* paramid2param(int id) const;
+<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">const</span> <span class="n">std</span><span class="p">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">Layer</span><span class="o">*&gt;&amp;</span> <span class="n">layers</span><span class="p">()</span> <span class="n">const</span><span class="p">;</span>
+<span class="n">const</span> <span class="n">std</span><span class="p">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">Param</span><span class="o">*&gt;&amp;</span> <span class="n">params</span><span class="p">()</span> <span class="n">const</span> <span class="p">;</span>
+<span class="n">Layer</span><span class="o">*</span> <span class="n">name2layer</span><span class="p">(</span><span class="n">string</span> <span class="n">name</span><span class="p">)</span> <span class="n">const</span><span class="p">;</span>
+<span class="n">Param</span><span class="o">*</span> <span class="n">paramid2param</span><span class="p">(</span><span class="nb">int</span> <span class="nb">id</span><span class="p">)</span> <span class="n">const</span><span class="p">;</span>
 </pre></div>
 </div>
 </div>

Modified: incubator/singa/site/trunk/en/docs/notebook/README.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/notebook/README.html?rev=1784386&r1=1784385&r2=1784386&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/notebook/README.html (original)
+++ incubator/singa/site/trunk/en/docs/notebook/README.html Sat Feb 25 15:30:33 2017
@@ -31,6 +31,9 @@
   
 
   
+        <link rel="index" title="Index"
+              href="../../genindex.html"/>
+        <link rel="search" title="Search" href="../../search.html"/>
     <link rel="top" title="incubator-singa 1.1.0 documentation" href="../../index.html"/>
     <link href="../../_static/style.css" rel="stylesheet" type="text/css">
 

Modified: incubator/singa/site/trunk/en/docs/optimizer.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/optimizer.html?rev=1784386&r1=1784385&r2=1784386&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/optimizer.html (original)
+++ incubator/singa/site/trunk/en/docs/optimizer.html Sat Feb 25 15:30:33 2017
@@ -31,6 +31,9 @@
   
 
   
+        <link rel="index" title="Index"
+              href="../genindex.html"/>
+        <link rel="search" title="Search" href="../search.html"/>
     <link rel="top" title="incubator-singa 1.1.0 documentation" href="../index.html"/>
         <link rel="up" title="Documentation" href="index.html"/>
         <link rel="next" title="Data" href="data.html"/>
@@ -100,7 +103,7 @@
 <li class="toctree-l2"><a class="reference internal" href="initializer.html">Initializer</a></li>
 <li class="toctree-l2"><a class="reference internal" href="loss.html">Loss</a></li>
 <li class="toctree-l2"><a class="reference internal" href="metric.html">Metric</a></li>
-<li class="toctree-l2 current"><a class="current reference internal" href="">Optimizer</a></li>
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Optimizer</a></li>
 <li class="toctree-l2"><a class="reference internal" href="data.html">Data</a></li>
 <li class="toctree-l2"><a class="reference internal" href="image_tool.html">Image Tool</a></li>
 <li class="toctree-l2"><a class="reference internal" href="snapshot.html">Snapshot</a></li>
@@ -171,8 +174,8 @@
 <span id="optimizer"></span><h1>Optimizer<a class="headerlink" href="#module-singa.optimizer" title="Permalink to this headline">¶</a></h1>
 <p>This module includes a set of optimizers for updating model parameters.</p>
 <p>Example usage:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">singa</span> <span class="kn">import</span> <span class="n">optimizer</span>
-<span class="kn">from</span> <span class="nn">singa</span> <span class="kn">import</span> <span class="n">tensor</span>
+<div class="highlight-default"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">singa</span> <span class="k">import</span> <span class="n">optimizer</span>
+<span class="kn">from</span> <span class="nn">singa</span> <span class="k">import</span> <span class="n">tensor</span>
 
 <span class="n">sgd</span> <span class="o">=</span> <span class="n">optimizer</span><span class="o">.</span><span class="n">SGD</span><span class="p">(</span><span class="n">lr</span><span class="o">=</span><span class="mf">0.01</span><span class="p">,</span> <span class="n">momentum</span><span class="o">=</span><span class="mf">0.9</span><span class="p">,</span> <span class="n">weight_decay</span><span class="o">=</span><span class="mf">1e-4</span><span class="p">)</span>
 <span class="n">p</span> <span class="o">=</span> <span class="n">tensor</span><span class="o">.</span><span class="n">Tensor</span><span class="p">((</span><span class="mi">3</span><span class="p">,</span><span class="mi">5</span><span class="p">))</span>

Modified: incubator/singa/site/trunk/en/docs/snapshot.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/snapshot.html?rev=1784386&r1=1784385&r2=1784386&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/snapshot.html (original)
+++ incubator/singa/site/trunk/en/docs/snapshot.html Sat Feb 25 15:30:33 2017
@@ -31,6 +31,9 @@
   
 
   
+        <link rel="index" title="Index"
+              href="../genindex.html"/>
+        <link rel="search" title="Search" href="../search.html"/>
     <link rel="top" title="incubator-singa 1.1.0 documentation" href="../index.html"/>
         <link rel="up" title="Documentation" href="index.html"/>
         <link rel="next" title="Caffe Converter" href="converter.html"/>
@@ -103,7 +106,7 @@
 <li class="toctree-l2"><a class="reference internal" href="optimizer.html">Optimizer</a></li>
 <li class="toctree-l2"><a class="reference internal" href="data.html">Data</a></li>
 <li class="toctree-l2"><a class="reference internal" href="image_tool.html">Image Tool</a></li>
-<li class="toctree-l2 current"><a class="current reference internal" href="">Snapshot</a></li>
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Snapshot</a></li>
 <li class="toctree-l2"><a class="reference internal" href="converter.html">Caffe Converter</a></li>
 <li class="toctree-l2"><a class="reference internal" href="utils.html">Utils</a></li>
 <li class="toctree-l2"><a class="reference internal" href="model_zoo/index.html">Model Zoo</a></li>
@@ -171,12 +174,12 @@
 <span id="snapshot"></span><h1>Snapshot<a class="headerlink" href="#module-singa.snapshot" title="Permalink to this headline">¶</a></h1>
 <p>This script includes io::snapshot class and its methods.</p>
 <p>Example usages:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">singa</span> <span class="kn">import</span> <span class="n">snapshot</span>
+<div class="highlight-default"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">singa</span> <span class="k">import</span> <span class="n">snapshot</span>
 
-<span class="n">sn1</span> <span class="o">=</span> <span class="n">snapshot</span><span class="o">.</span><span class="n">Snapshot</span><span class="p">(</span><span class="s1">&#39;param&#39;</span><span class="p">,</span> <span class="bp">False</span><span class="p">)</span>
+<span class="n">sn1</span> <span class="o">=</span> <span class="n">snapshot</span><span class="o">.</span><span class="n">Snapshot</span><span class="p">(</span><span class="s1">&#39;param&#39;</span><span class="p">,</span> <span class="kc">False</span><span class="p">)</span>
 <span class="n">params</span> <span class="o">=</span> <span class="n">sn1</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>  <span class="c1"># read all params as a dictionary</span>
 
-<span class="n">sn2</span> <span class="o">=</span> <span class="n">snapshot</span><span class="o">.</span><span class="n">Snapshot</span><span class="p">(</span><span class="s1">&#39;param_new&#39;</span><span class="p">,</span> <span class="bp">False</span><span class="p">)</span>
+<span class="n">sn2</span> <span class="o">=</span> <span class="n">snapshot</span><span class="o">.</span><span class="n">Snapshot</span><span class="p">(</span><span class="s1">&#39;param_new&#39;</span><span class="p">,</span> <span class="kc">False</span><span class="p">)</span>
 <span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">params</span><span class="o">.</span><span class="n">iteritems</span><span class="p">():</span>
     <span class="n">sn2</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">k</span><span class="p">,</span> <span class="n">v</span><span class="p">)</span>
 </pre></div>

Modified: incubator/singa/site/trunk/en/docs/software_stack.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/software_stack.html?rev=1784386&r1=1784385&r2=1784386&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/software_stack.html (original)
+++ incubator/singa/site/trunk/en/docs/software_stack.html Sat Feb 25 15:30:33 2017
@@ -31,6 +31,9 @@
   
 
   
+        <link rel="index" title="Index"
+              href="../genindex.html"/>
+        <link rel="search" title="Search" href="../search.html"/>
     <link rel="top" title="incubator-singa 1.1.0 documentation" href="../index.html"/>
         <link rel="up" title="Documentation" href="index.html"/>
         <link rel="next" title="Device" href="device.html"/>
@@ -92,7 +95,7 @@
 <li class="toctree-l1"><a class="reference internal" href="../downloads.html">Download SINGA</a></li>
 <li class="toctree-l1 current"><a class="reference internal" href="index.html">Documentation</a><ul class="current">
 <li class="toctree-l2"><a class="reference internal" href="installation.html">Installation</a></li>
-<li class="toctree-l2 current"><a class="current reference internal" href="">Software Stack</a><ul>
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Software Stack</a><ul>
 <li class="toctree-l3"><a class="reference internal" href="#core">Core</a></li>
 <li class="toctree-l3"><a class="reference internal" href="#model">Model</a></li>
 <li class="toctree-l3"><a class="reference internal" href="#io">IO</a></li>