singa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wang...@apache.org
Subject svn commit: r1756485 [1/4] - in /incubator/singa/site/trunk: en/ en/_static/ en/community/ en/develop/ en/docs/ zh/ zh/_static/
Date Tue, 16 Aug 2016 07:30:21 GMT
Author: wangwei
Date: Tue Aug 16 07:30:21 2016
New Revision: 1756485

URL: http://svn.apache.org/viewvc?rev=1756485&view=rev
Log:
udpate the API doc for py modules.

Modified:
    incubator/singa/site/trunk/en/.buildinfo
    incubator/singa/site/trunk/en/_static/pygments.css
    incubator/singa/site/trunk/en/community/source-repository.html
    incubator/singa/site/trunk/en/develop/contribute-code.html
    incubator/singa/site/trunk/en/develop/contribute-docs.html
    incubator/singa/site/trunk/en/develop/schedule.html
    incubator/singa/site/trunk/en/docs.html
    incubator/singa/site/trunk/en/docs/cnn.html
    incubator/singa/site/trunk/en/docs/device.html
    incubator/singa/site/trunk/en/docs/index.html
    incubator/singa/site/trunk/en/docs/initializer.html
    incubator/singa/site/trunk/en/docs/installation.html
    incubator/singa/site/trunk/en/docs/layer.html
    incubator/singa/site/trunk/en/docs/loss.html
    incubator/singa/site/trunk/en/docs/metric.html
    incubator/singa/site/trunk/en/docs/neural-net.html
    incubator/singa/site/trunk/en/docs/optimizer.html
    incubator/singa/site/trunk/en/docs/software_stack.html
    incubator/singa/site/trunk/en/docs/tensor.html
    incubator/singa/site/trunk/en/docs/utils.html
    incubator/singa/site/trunk/en/genindex.html
    incubator/singa/site/trunk/en/objects.inv
    incubator/singa/site/trunk/en/searchindex.js
    incubator/singa/site/trunk/zh/.buildinfo
    incubator/singa/site/trunk/zh/_static/pygments.css
    incubator/singa/site/trunk/zh/genindex.html
    incubator/singa/site/trunk/zh/index.html
    incubator/singa/site/trunk/zh/search.html

Modified: incubator/singa/site/trunk/en/.buildinfo
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/.buildinfo?rev=1756485&r1=1756484&r2=1756485&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/.buildinfo (original)
+++ incubator/singa/site/trunk/en/.buildinfo Tue Aug 16 07:30:21 2016
@@ -1,4 +1,4 @@
 # Sphinx build info version 1
 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
-config: 9a1d83ea722f672536594fbfde6df879
+config: 38d34329735699bcd380962b209f9e7e
 tags: 645f666f9bcd5a90fca523b33c5a78b7

Modified: incubator/singa/site/trunk/en/_static/pygments.css
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/_static/pygments.css?rev=1756485&r1=1756484&r2=1756485&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/_static/pygments.css (original)
+++ incubator/singa/site/trunk/en/_static/pygments.css Tue Aug 16 07:30:21 2016
@@ -4,10 +4,8 @@
 .highlight .err { border: 1px solid #FF0000 } /* Error */
 .highlight .k { color: #007020; font-weight: bold } /* Keyword */
 .highlight .o { color: #666666 } /* Operator */
-.highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */
 .highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */
 .highlight .cp { color: #007020 } /* Comment.Preproc */
-.highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */
 .highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */
 .highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
 .highlight .gd { color: #A00000 } /* Generic.Deleted */
@@ -42,7 +40,6 @@
 .highlight .nv { color: #bb60d5 } /* Name.Variable */
 .highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
 .highlight .w { color: #bbbbbb } /* Text.Whitespace */
-.highlight .mb { color: #208050 } /* Literal.Number.Bin */
 .highlight .mf { color: #208050 } /* Literal.Number.Float */
 .highlight .mh { color: #208050 } /* Literal.Number.Hex */
 .highlight .mi { color: #208050 } /* Literal.Number.Integer */

Modified: incubator/singa/site/trunk/en/community/source-repository.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/community/source-repository.html?rev=1756485&r1=1756484&r2=1756485&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/community/source-repository.html (original)
+++ incubator/singa/site/trunk/en/community/source-repository.html Tue Aug 16 07:30:21 2016
@@ -164,11 +164,11 @@
 <div class="section" id="upstream-for-committers">
 <span id="upstream-for-committers"></span><h2>Upstream for committers<a class="headerlink" href="#upstream-for-committers" title="Permalink to this headline">¶</a></h2>
 <p>Committers need to set the upstream endpoint to the Apache git (not github) repo address, e.g.,</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span>$ git remote add asf https://git-wip-us.apache.org/repos/asf/incubator-singa.git
+<div class="highlight-default"><div class="highlight"><pre>$ git remote add asf https://git-wip-us.apache.org/repos/asf/incubator-singa.git
 </pre></div>
 </div>
 <p>Then you (committer) can push your code in this way,</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span>$ git push asf &lt;local-branch&gt;:&lt;remote-branch&gt;
+<div class="highlight-default"><div class="highlight"><pre>$ git push asf &lt;local-branch&gt;:&lt;remote-branch&gt;
 </pre></div>
 </div>
 </div>

Modified: incubator/singa/site/trunk/en/develop/contribute-code.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/develop/contribute-code.html?rev=1756485&r1=1756484&r2=1756485&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/develop/contribute-code.html (original)
+++ incubator/singa/site/trunk/en/develop/contribute-code.html Tue Aug 16 07:30:21 2016
@@ -158,7 +158,7 @@
 <span id="coding-style"></span><h2>Coding Style<a class="headerlink" href="#coding-style" title="Permalink to this headline">¶</a></h2>
 <p>The SINGA codebase follows the <a class="reference external" href="http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml">Google C++ Style Guide</a>.</p>
 <p>To check if your code follows the style, you can use the provided cpplint tool:</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span>$ ./tool/cpplint.py YOUR_FILE
+<div class="highlight-default"><div class="highlight"><pre>$ ./tool/cpplint.py YOUR_FILE
 </pre></div>
 </div>
 </div>

Modified: incubator/singa/site/trunk/en/develop/contribute-docs.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/develop/contribute-docs.html?rev=1756485&r1=1756484&r2=1756485&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/develop/contribute-docs.html (original)
+++ incubator/singa/site/trunk/en/develop/contribute-docs.html Tue Aug 16 07:30:21 2016
@@ -158,15 +158,15 @@
 <p>This document gives step-by-step instructions for deploying <a class="reference external" href="http://singa.incubator.apache.org">Singa website</a>.</p>
 <p>Singa website is built by <a class="reference external" href="http://www.sphinx-doc.org">Sphinx</a> 1.4.4 from a source tree stored in git: https://github.com/apache/incubator-singa/tree/master/doc.</p>
 <p>To install Sphinx on Ubuntu:</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span>$ apt-get install python-sphinx
+<div class="highlight-default"><div class="highlight"><pre>$ apt-get install python-sphinx
 </pre></div>
 </div>
 <p>To install the markdown support for Sphinx:</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install recommonmark
+<div class="highlight-default"><div class="highlight"><pre>$ pip install recommonmark
 </pre></div>
 </div>
 <p>You can build the website by executing the following command from the doc folder:</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span>$ make html
+<div class="highlight-default"><div class="highlight"><pre>$ make html
 </pre></div>
 </div>
 <p>The procedure for contributing documentation is the same as <a class="reference external" href="contribute-code.html">contributing code</a>.</p>

Modified: incubator/singa/site/trunk/en/develop/schedule.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/develop/schedule.html?rev=1756485&r1=1756484&r2=1756485&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/develop/schedule.html (original)
+++ incubator/singa/site/trunk/en/develop/schedule.html Tue Aug 16 07:30:21 2016
@@ -33,7 +33,7 @@
   
     <link rel="top" title="incubator-singa 1.0.0 documentation" href="../index.html"/>
         <link rel="next" title="How to Contribute to SINGA" href="how-contribute.html"/>
-        <link rel="prev" title="Optimizer" href="../docs/optimizer.html"/>
+        <link rel="prev" title="Train AlexNet over ImageNet" href="../docs/examples/imagenet/README.html"/>
     <link href="../_static/style.css" rel="stylesheet" type="text/css">
 
 
@@ -454,7 +454,7 @@
         <a href="how-contribute.html" class="btn btn-neutral float-right" title="How to Contribute to SINGA" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
       
       
-        <a href="../docs/optimizer.html" class="btn btn-neutral" title="Optimizer" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+        <a href="../docs/examples/imagenet/README.html" class="btn btn-neutral" title="Train AlexNet over ImageNet" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
       
     </div>
   

Modified: incubator/singa/site/trunk/en/docs.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs.html?rev=1756485&r1=1756484&r2=1756485&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs.html (original)
+++ incubator/singa/site/trunk/en/docs.html Tue Aug 16 07:30:21 2016
@@ -176,29 +176,55 @@
 </li>
 <li class="toctree-l2"><a class="reference internal" href="docs/device.html">Device</a><ul>
 <li class="toctree-l3"><a class="reference internal" href="docs/device.html#specific-devices">Specific devices</a></li>
-<li class="toctree-l3"><a class="reference internal" href="docs/device.html#python-api">Python API</a></li>
+<li class="toctree-l3"><a class="reference internal" href="docs/device.html#module-singa.device">Python API</a></li>
 <li class="toctree-l3"><a class="reference internal" href="docs/device.html#cpp-api">CPP API</a></li>
 </ul>
 </li>
 <li class="toctree-l2"><a class="reference internal" href="docs/tensor.html">Tensor</a><ul>
 <li class="toctree-l3"><a class="reference internal" href="docs/tensor.html#tensor-implementation">Tensor implementation</a></li>
-<li class="toctree-l3"><a class="reference internal" href="docs/tensor.html#python-api">Python API</a></li>
+<li class="toctree-l3"><a class="reference internal" href="docs/tensor.html#module-singa.tensor">Python API</a></li>
 <li class="toctree-l3"><a class="reference internal" href="docs/tensor.html#cpp-api">CPP API</a></li>
 </ul>
 </li>
 <li class="toctree-l2"><a class="reference internal" href="docs/layer.html">Layer</a><ul>
-<li class="toctree-l3"><a class="reference internal" href="docs/layer.html#python-api">Python API</a></li>
+<li class="toctree-l3"><a class="reference internal" href="docs/layer.html#module-singa.layer">Python API</a></li>
 <li class="toctree-l3"><a class="reference internal" href="docs/layer.html#cpp-api">CPP API</a></li>
 </ul>
 </li>
 <li class="toctree-l2"><a class="reference internal" href="docs/initializer.html">Initializer</a><ul>
-<li class="toctree-l3"><a class="reference internal" href="docs/initializer.html#python-api">Python API</a></li>
+<li class="toctree-l3"><a class="reference internal" href="docs/initializer.html#module-singa.initializer">Python API</a></li>
 <li class="toctree-l3"><a class="reference internal" href="docs/initializer.html#cpp-api">CPP API</a></li>
 </ul>
 </li>
 <li class="toctree-l2"><a class="reference internal" href="docs/loss.html">Loss</a></li>
 <li class="toctree-l2"><a class="reference internal" href="docs/metric.html">Metric</a></li>
 <li class="toctree-l2"><a class="reference internal" href="docs/optimizer.html">Optimizer</a></li>
+<li class="toctree-l2"><a class="reference internal" href="docs/examples/index.html">Examples</a><ul>
+<li class="toctree-l3"><a class="reference internal" href="docs/examples/cifar10/README.html">Train CNN over Cifar-10</a><ul>
+<li class="toctree-l4"><a class="reference internal" href="docs/examples/cifar10/README.html#instructions">Instructions</a><ul>
+<li class="toctree-l5"><a class="reference internal" href="docs/examples/cifar10/README.html#singa-installation">SINGA installation</a></li>
+<li class="toctree-l5"><a class="reference internal" href="docs/examples/cifar10/README.html#training">Training</a></li>
+<li class="toctree-l5"><a class="reference internal" href="docs/examples/cifar10/README.html#prediction">Prediction</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li class="toctree-l3"><a class="reference internal" href="docs/examples/char-rnn/README.html">Train Char-RNN over plain text</a><ul>
+<li class="toctree-l4"><a class="reference internal" href="docs/examples/char-rnn/README.html#instructions">Instructions</a></li>
+</ul>
+</li>
+<li class="toctree-l3"><a class="reference internal" href="docs/examples/imagenet/README.html">Train AlexNet over ImageNet</a><ul>
+<li class="toctree-l4"><a class="reference internal" href="docs/examples/imagenet/README.html#instructions">Instructions</a><ul>
+<li class="toctree-l5"><a class="reference internal" href="docs/examples/imagenet/README.html#compile-singa">Compile SINGA</a></li>
+<li class="toctree-l5"><a class="reference internal" href="docs/examples/imagenet/README.html#data-download">Data download</a></li>
+<li class="toctree-l5"><a class="reference internal" href="docs/examples/imagenet/README.html#data-preprocessing">Data preprocessing</a></li>
+<li class="toctree-l5"><a class="reference internal" href="docs/examples/imagenet/README.html#training">Training</a></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</li>
 </ul>
 </li>
 </ul>

Modified: incubator/singa/site/trunk/en/docs/cnn.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/cnn.html?rev=1756485&r1=1756484&r2=1756485&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/cnn.html (original)
+++ incubator/singa/site/trunk/en/docs/cnn.html Tue Aug 16 07:30:21 2016
@@ -150,7 +150,7 @@ Convolution neural network (CNN) is a ty
 <span id="running-instructions-for-cpp-version"></span><h1>Running instructions for CPP version<a class="headerlink" href="#running-instructions-for-cpp-version" title="Permalink to this headline">¶</a></h1>
 <p>Please refer to <a class="reference external" href="installation.html">Installation</a> page for how to install SINGA. Currently, we CNN requires CUDNN, hence both CUDA and CUDNN should be installed and SINGA should be compiled with CUDA and CUDNN.</p>
 <p>The Cifar10 dataset could be downloaded by running</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span># switch to cifar10 directory
+<div class="highlight-default"><div class="highlight"><pre># switch to cifar10 directory
 $ cd ../examples/cifar10
 # download data for CPP version
 $ python download_data.py bin
@@ -158,18 +158,18 @@ $ python download_data.py bin
 </div>
 <p>&#8216;bin&#8217; is for downloading binary version of Cifar10 data.</p>
 <p>During downloading, you should see the detailed output like</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span> Downloading CIFAR10 from http://www.cs.toronto.edu/~kriz/cifar-10-binary.tar.gz
+<div class="highlight-default"><div class="highlight"><pre> Downloading CIFAR10 from http://www.cs.toronto.edu/~kriz/cifar-10-binary.tar.gz
  The tar file does exist. Extracting it now..
  Finished!
 </pre></div>
 </div>
 <p>Now you have prepared the data for this Cifar10 example, the final step is to execute the <code class="docutils literal"><span class="pre">run.sh</span></code> script,</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span># in SINGA_ROOT/examples/cifar10/
+<div class="highlight-default"><div class="highlight"><pre># in SINGA_ROOT/examples/cifar10/
 $ ./run.sh
 </pre></div>
 </div>
 <p>You should see the detailed output as follows: first read the data files in order, show the statistics of training and testing data, then show the details of neural net structure with some parameter information, finally illustrate the performance details during training and validation process. The number of epochs can be specified in <code class="docutils literal"><span class="pre">run.sh</span></code> file.</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Start</span> <span class="n">training</span>
+<div class="highlight-default"><div class="highlight"><pre><span class="n">Start</span> <span class="n">training</span>
 <span class="n">Reading</span> <span class="n">file</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="nb">bin</span><span class="o">/</span><span class="n">data_batch_1</span><span class="o">.</span><span class="n">bin</span>
 <span class="n">Reading</span> <span class="n">file</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="nb">bin</span><span class="o">/</span><span class="n">data_batch_2</span><span class="o">.</span><span class="n">bin</span>
 <span class="n">Reading</span> <span class="n">file</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="nb">bin</span><span class="o">/</span><span class="n">data_batch_3</span><span class="o">.</span><span class="n">bin</span>
@@ -215,30 +215,30 @@ $ ./run.sh
 <div class="section" id="running-instructions-for-python-version">
 <span id="running-instructions-for-python-version"></span><h1>Running instructions for Python version<a class="headerlink" href="#running-instructions-for-python-version" title="Permalink to this headline">¶</a></h1>
 <p>To run CNN example in Python version, we need to compile SINGA with Python binding,</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span>$ mkdir build &amp;&amp; cd build
+<div class="highlight-default"><div class="highlight"><pre>$ mkdir build &amp;&amp; cd build
 $ cmake -DUSE_PYTHON=ON ..
 $ make
 </pre></div>
 </div>
 <p>Now download the Cifar10 dataset,</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span># switch to cifar10 directory
+<div class="highlight-default"><div class="highlight"><pre># switch to cifar10 directory
 $ cd ../examples/cifar10
 # download data for Python version
 $ python download_data.py py
 </pre></div>
 </div>
 <p>During downloading, you should see the detailed output like</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span> Downloading CIFAR10 from http://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz
+<div class="highlight-default"><div class="highlight"><pre> Downloading CIFAR10 from http://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz
  The tar file does exist. Extracting it now..
  Finished!
 </pre></div>
 </div>
 <p>Then execute the <code class="docutils literal"><span class="pre">train.py</span></code> script to build the model</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span>$ python train.py
+<div class="highlight-default"><div class="highlight"><pre>$ python train.py
 </pre></div>
 </div>
 <p>You should see the output as follows including the details of neural net structure with some parameter information, reading data files, and the performance details during training and testing process.</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span><span class="p">(</span><span class="mi">32</span><span class="n">L</span><span class="p">,</span> <span class="mi">32</span><span class="n">L</span><span class="p">,</span> <span class="mi">32</span><span class="n">L</span><span class="p">)</span>
+<div class="highlight-default"><div class="highlight"><pre><span class="p">(</span><span class="mi">32</span><span class="n">L</span><span class="p">,</span> <span class="mi">32</span><span class="n">L</span><span class="p">,</span> <span class="mi">32</span><span class="n">L</span><span class="p">)</span>
 <span class="p">(</span><span class="mi">32</span><span class="n">L</span><span class="p">,</span> <span class="mi">16</span><span class="n">L</span><span class="p">,</span> <span class="mi">16</span><span class="n">L</span><span class="p">)</span>
 <span class="p">(</span><span class="mi">32</span><span class="n">L</span><span class="p">,</span> <span class="mi">16</span><span class="n">L</span><span class="p">,</span> <span class="mi">16</span><span class="n">L</span><span class="p">)</span>
 <span class="p">(</span><span class="mi">32</span><span class="n">L</span><span class="p">,</span> <span class="mi">16</span><span class="n">L</span><span class="p">,</span> <span class="mi">16</span><span class="n">L</span><span class="p">)</span>
@@ -281,7 +281,7 @@ $ python download_data.py py
 </pre></div>
 </div>
 <p>This script will call <code class="docutils literal"><span class="pre">alexnet.py</span></code> file to build the alexnet model. After the training is finished, SINGA will save the model parameters into a checkpoint file <code class="docutils literal"><span class="pre">model.bin</span></code> in the same directory. Then we can use this <code class="docutils literal"><span class="pre">model.bin</span></code> file for prediction.</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span>$ python predict.py
+<div class="highlight-default"><div class="highlight"><pre>$ python predict.py
 </pre></div>
 </div>
 </div>

Modified: incubator/singa/site/trunk/en/docs/device.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/device.html?rev=1756485&r1=1756484&r2=1756485&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/device.html (original)
+++ incubator/singa/site/trunk/en/docs/device.html Tue Aug 16 07:30:21 2016
@@ -95,7 +95,7 @@
 <li class="toctree-l2"><a class="reference internal" href="software_stack.html">Software Stack</a></li>
 <li class="toctree-l2 current"><a class="current reference internal" href="#">Device</a><ul>
 <li class="toctree-l3"><a class="reference internal" href="#specific-devices">Specific devices</a></li>
-<li class="toctree-l3"><a class="reference internal" href="#python-api">Python API</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#module-singa.device">Python API</a></li>
 <li class="toctree-l3"><a class="reference internal" href="#cpp-api">CPP API</a></li>
 </ul>
 </li>
@@ -105,6 +105,7 @@
 <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"><a class="reference internal" href="optimizer.html">Optimizer</a></li>
+<li class="toctree-l2"><a class="reference internal" href="examples/index.html">Examples</a></li>
 </ul>
 </li>
 </ul>
@@ -180,14 +181,55 @@ of memory and execution are implemented
 <li>OpenclGPU for a GPU card which runs OpenCL code</li>
 </ol>
 </div>
-<div class="section" id="python-api">
-<h2>Python API<a class="headerlink" href="#python-api" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="module-singa.device">
+<span id="python-api"></span><h2>Python API<a class="headerlink" href="#module-singa.device" title="Permalink to this headline">¶</a></h2>
+<p>This script includes Device class and its subclasses for python users
+to call singa::Device and its methods.</p>
+<p>TODO(wangwei) implement py CudaGPU class.</p>
+<dl class="function">
+<dt id="singa.device.create_cuda_gpus">
+<code class="descclassname">singa.device.</code><code class="descname">create_cuda_gpus</code><span class="sig-paren">(</span><em>num</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.device.create_cuda_gpus" title="Permalink to this definition">¶</a></dt>
+<dd><p>Create a list of CudaGPU devices.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>num</strong> (<em>int</em>) &#8211; number of device to create.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">a list of swig converted CudaGPU devices.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="singa.device.create_cuda_gpus_on">
+<code class="descclassname">singa.device.</code><code class="descname">create_cuda_gpus_on</code><span class="sig-paren">(</span><em>device_ids</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.device.create_cuda_gpus_on" title="Permalink to this definition">¶</a></dt>
+<dd><p>Create a list of CudaGPU devices.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>device_ids</strong> (<em>list</em>) &#8211; a list of GPU card IDs.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">a list of swig converted CudaGPU devices.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="singa.device.get_default_device">
+<code class="descclassname">singa.device.</code><code class="descname">get_default_device</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#singa.device.get_default_device" title="Permalink to this definition">¶</a></dt>
+<dd><p>Get the default host device which is a CppCPU device</p>
+</dd></dl>
+
 <p>The following code provides examples of creating devices:</p>
-<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">device</span>
-<span class="n">cuda</span> <span class="o">=</span> <span class="n">device</span><span class="o">.</span><span class="n">create_cuda_gpu_on</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>  <span class="c1"># use GPU card of ID 0</span>
-<span class="n">host</span> <span class="o">=</span> <span class="n">device</span><span class="o">.</span><span class="n">get_default_device</span><span class="p">()</span>  <span class="c1"># get the default host device (a CppCPU)</span>
-<span class="n">ary1</span> <span class="o">=</span> <span class="n">device</span><span class="o">.</span><span class="n">create_cuda_gpus</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>  <span class="c1"># create 2 devices, starting from ID 0</span>
-<span class="n">ary2</span> <span class="o">=</span> <span class="n">device</span><span class="o">.</span><span class="n">create_cuda_gpus</span><span class="p">([</span><span class="mi">0</span><span class="p">,</span><span class="mi">2</span><span class="p">])</span>  <span class="c1"># create 2 devices on ID 0 and 2</span>
+<div class="highlight-default"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">singa</span> <span class="k">import</span> <span class="n">device</span>
+<span class="n">cuda</span> <span class="o">=</span> <span class="n">device</span><span class="o">.</span><span class="n">create_cuda_gpu_on</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>  <span class="c"># use GPU card of ID 0</span>
+<span class="n">host</span> <span class="o">=</span> <span class="n">device</span><span class="o">.</span><span class="n">get_default_device</span><span class="p">()</span>  <span class="c"># get the default host device (a CppCPU)</span>
+<span class="n">ary1</span> <span class="o">=</span> <span class="n">device</span><span class="o">.</span><span class="n">create_cuda_gpus</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>  <span class="c"># create 2 devices, starting from ID 0</span>
+<span class="n">ary2</span> <span class="o">=</span> <span class="n">device</span><span class="o">.</span><span class="n">create_cuda_gpus</span><span class="p">([</span><span class="mi">0</span><span class="p">,</span><span class="mi">2</span><span class="p">])</span>  <span class="c"># create 2 devices on ID 0 and 2</span>
 </pre></div>
 </div>
 </div>

Modified: incubator/singa/site/trunk/en/docs/index.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/index.html?rev=1756485&r1=1756484&r2=1756485&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/index.html (original)
+++ incubator/singa/site/trunk/en/docs/index.html Tue Aug 16 07:30:21 2016
@@ -99,6 +99,7 @@
 <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"><a class="reference internal" href="optimizer.html">Optimizer</a></li>
+<li class="toctree-l2"><a class="reference internal" href="examples/index.html">Examples</a></li>
 </ul>
 </li>
 </ul>
@@ -188,29 +189,55 @@
 </li>
 <li class="toctree-l1"><a class="reference internal" href="device.html">Device</a><ul>
 <li class="toctree-l2"><a class="reference internal" href="device.html#specific-devices">Specific devices</a></li>
-<li class="toctree-l2"><a class="reference internal" href="device.html#python-api">Python API</a></li>
+<li class="toctree-l2"><a class="reference internal" href="device.html#module-singa.device">Python API</a></li>
 <li class="toctree-l2"><a class="reference internal" href="device.html#cpp-api">CPP API</a></li>
 </ul>
 </li>
 <li class="toctree-l1"><a class="reference internal" href="tensor.html">Tensor</a><ul>
 <li class="toctree-l2"><a class="reference internal" href="tensor.html#tensor-implementation">Tensor implementation</a></li>
-<li class="toctree-l2"><a class="reference internal" href="tensor.html#python-api">Python API</a></li>
+<li class="toctree-l2"><a class="reference internal" href="tensor.html#module-singa.tensor">Python API</a></li>
 <li class="toctree-l2"><a class="reference internal" href="tensor.html#cpp-api">CPP API</a></li>
 </ul>
 </li>
 <li class="toctree-l1"><a class="reference internal" href="layer.html">Layer</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="layer.html#python-api">Python API</a></li>
+<li class="toctree-l2"><a class="reference internal" href="layer.html#module-singa.layer">Python API</a></li>
 <li class="toctree-l2"><a class="reference internal" href="layer.html#cpp-api">CPP API</a></li>
 </ul>
 </li>
 <li class="toctree-l1"><a class="reference internal" href="initializer.html">Initializer</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="initializer.html#python-api">Python API</a></li>
+<li class="toctree-l2"><a class="reference internal" href="initializer.html#module-singa.initializer">Python API</a></li>
 <li class="toctree-l2"><a class="reference internal" href="initializer.html#cpp-api">CPP API</a></li>
 </ul>
 </li>
 <li class="toctree-l1"><a class="reference internal" href="loss.html">Loss</a></li>
 <li class="toctree-l1"><a class="reference internal" href="metric.html">Metric</a></li>
 <li class="toctree-l1"><a class="reference internal" href="optimizer.html">Optimizer</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/index.html">Examples</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="examples/cifar10/README.html">Train CNN over Cifar-10</a><ul>
+<li class="toctree-l3"><a class="reference internal" href="examples/cifar10/README.html#instructions">Instructions</a><ul>
+<li class="toctree-l4"><a class="reference internal" href="examples/cifar10/README.html#singa-installation">SINGA installation</a></li>
+<li class="toctree-l4"><a class="reference internal" href="examples/cifar10/README.html#training">Training</a></li>
+<li class="toctree-l4"><a class="reference internal" href="examples/cifar10/README.html#prediction">Prediction</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li class="toctree-l2"><a class="reference internal" href="examples/char-rnn/README.html">Train Char-RNN over plain text</a><ul>
+<li class="toctree-l3"><a class="reference internal" href="examples/char-rnn/README.html#instructions">Instructions</a></li>
+</ul>
+</li>
+<li class="toctree-l2"><a class="reference internal" href="examples/imagenet/README.html">Train AlexNet over ImageNet</a><ul>
+<li class="toctree-l3"><a class="reference internal" href="examples/imagenet/README.html#instructions">Instructions</a><ul>
+<li class="toctree-l4"><a class="reference internal" href="examples/imagenet/README.html#compile-singa">Compile SINGA</a></li>
+<li class="toctree-l4"><a class="reference internal" href="examples/imagenet/README.html#data-download">Data download</a></li>
+<li class="toctree-l4"><a class="reference internal" href="examples/imagenet/README.html#data-preprocessing">Data preprocessing</a></li>
+<li class="toctree-l4"><a class="reference internal" href="examples/imagenet/README.html#training">Training</a></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</li>
 </ul>
 </div>
 </div>

Modified: incubator/singa/site/trunk/en/docs/initializer.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/initializer.html?rev=1756485&r1=1756484&r2=1756485&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/initializer.html (original)
+++ incubator/singa/site/trunk/en/docs/initializer.html Tue Aug 16 07:30:21 2016
@@ -97,13 +97,14 @@
 <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="#">Initializer</a><ul>
-<li class="toctree-l3"><a class="reference internal" href="#python-api">Python API</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#module-singa.initializer">Python API</a></li>
 <li class="toctree-l3"><a class="reference internal" href="#cpp-api">CPP API</a></li>
 </ul>
 </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"><a class="reference internal" href="optimizer.html">Optimizer</a></li>
+<li class="toctree-l2"><a class="reference internal" href="examples/index.html">Examples</a></li>
 </ul>
 </li>
 </ul>
@@ -166,8 +167,68 @@
             
   <div class="section" id="initializer">
 <h1>Initializer<a class="headerlink" href="#initializer" title="Permalink to this headline">¶</a></h1>
-<div class="section" id="python-api">
-<h2>Python API<a class="headerlink" href="#python-api" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="module-singa.initializer">
+<span id="python-api"></span><h2>Python API<a class="headerlink" href="#module-singa.initializer" title="Permalink to this headline">¶</a></h2>
+<p>Popular initialization methods for parameter values (Tensor objects).</p>
+<p>Example usages:</p>
+<div class="highlight-default"><div class="highlight"><pre><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">initializer</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">initializer</span><span class="o">.</span><span class="n">uniform</span><span class="p">(</span><span class="n">x</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="c"># use both fan_in and fan_out</span>
+<span class="n">initializer</span><span class="o">.</span><span class="n">uniform</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>  <span class="c"># use only fan_in</span>
+</pre></div>
+</div>
+<dl class="function">
+<dt id="singa.initializer.uniform">
+<code class="descclassname">singa.initializer.</code><code class="descname">uniform</code><span class="sig-paren">(</span><em>t</em>, <em>fan_in=0</em>, <em>fan_out=0</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.initializer.uniform" title="Permalink to this definition">¶</a></dt>
+<dd><p>Initialize the values of the input tensor following a uniform
+distribution with specific bounds.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<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 last simple">
+<li><strong>fan_in</strong> (<em>int</em>) &#8211; for the weight Tensor of a convolution layer,
+fan_in = nb_channel * kh * kw; for dense layer,
+fan_in = input_feature_length</li>
+<li><strong>fan_out</strong> (<em>int</em>) &#8211; for the convolution layer weight Tensor,
+fan_out = nb_filter * kh * kw; for the weight Tensor of a dense
+layer, fan_out = output_feature_length</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+<p>Ref: [Bengio and Glorot 2010]: Understanding the difficulty of
+training deep feedforward neuralnetworks.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="singa.initializer.gaussian">
+<code class="descclassname">singa.initializer.</code><code class="descname">gaussian</code><span class="sig-paren">(</span><em>t</em>, <em>fan_in=0</em>, <em>fan_out=0</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.initializer.gaussian" title="Permalink to this definition">¶</a></dt>
+<dd><p>Initialize the values of the input tensor following a Gaussian
+distribution with specific std.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<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 last simple">
+<li><strong>fan_in</strong> (<em>int</em>) &#8211; for the weight Tensor of a convolution layer,
+fan_in = nb_channel * kh * kw; for dense layer,
+fan_in = input_feature_length</li>
+<li><strong>fan_out</strong> (<em>int</em>) &#8211; for the convolution layer weight Tensor,
+fan_out = nb_filter * kh * kw; for the weight Tensor of a dense
+layer, fan_out = output_feature_length</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+<p>Ref Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun: Delving Deep into
+Rectifiers: Surpassing Human-Level Performance on ImageNet Classification</p>
+</dd></dl>
+
 </div>
 <div class="section" id="cpp-api">
 <h2>CPP API<a class="headerlink" href="#cpp-api" title="Permalink to this headline">¶</a></h2>

Modified: incubator/singa/site/trunk/en/docs/installation.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/installation.html?rev=1756485&r1=1756484&r2=1756485&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/installation.html (original)
+++ incubator/singa/site/trunk/en/docs/installation.html Tue Aug 16 07:30:21 2016
@@ -118,6 +118,7 @@
 <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"><a class="reference internal" href="optimizer.html">Optimizer</a></li>
+<li class="toctree-l2"><a class="reference internal" href="examples/index.html">Examples</a></li>
 </ul>
 </li>
 </ul>
@@ -211,10 +212,10 @@
 get better performance.
 Most of the dependent libraries could be installed via package mangers like
 apt-get or homebrew.</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># for ubuntu users, tested on 14.04</span>
+<div class="highlight-default"><div class="highlight"><pre><span class="c"># for ubuntu users, tested on 14.04</span>
 <span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">libprotobuf</span><span class="o">-</span><span class="n">dev</span> <span class="n">libopenblas</span><span class="o">-</span><span class="n">dev</span> <span class="n">libopencv</span><span class="o">-</span><span class="n">dev</span> <span class="n">protobuf</span><span class="o">-</span><span class="n">compiler</span> <span class="n">libgoogle</span><span class="o">-</span><span class="n">glog</span><span class="o">-</span><span class="n">dev</span> <span class="n">liblmdb</span><span class="o">-</span><span class="n">dev</span> <span class="n">python2</span><span class="o">.</span><span class="mi">7</span><span class="o">-</span><span class="n">dev</span> <span class="n">python</span><span class="o">-</span><span class="n">pip</span> <span class="n">python</span><span class="o">-</span><span class="n">numpy</span>
 
-<span class="c1"># for Mac OS users</span>
+<span class="c"># for Mac OS users</span>
 <span class="n">brew</span> <span class="n">install</span> <span class="o">-</span><span class="n">vd</span> <span class="n">glog</span> <span class="n">lmdb</span>
 <span class="n">brew</span> <span class="n">tap</span> <span class="n">homebrew</span><span class="o">/</span><span class="n">science</span>
 <span class="n">brew</span> <span class="n">install</span> <span class="n">opencv</span>
@@ -231,7 +232,7 @@ apt-get or homebrew.</p>
 <div class="section" id="from-wheel">
 <span id="from-wheel"></span><h3>From wheel<a class="headerlink" href="#from-wheel" title="Permalink to this headline">¶</a></h3>
 <p>After installing the dependencies for SINGA and PySINGA, please download the correct binary:</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span># Ubuntu/Linux 64-bit, CPU only, Python 2.7, Protobuf 2.5
+<div class="highlight-default"><div class="highlight"><pre># Ubuntu/Linux 64-bit, CPU only, Python 2.7, Protobuf 2.5
 $ export SINGA_WHEEL_URL=http://comp.nus.edu.sg/~dbsystem/singa/assets/file/pb2.5/singa-1.0.0-cp27-none-linux_x86_64.whl
 
 # Ubuntu/Linux 64-bit, CPU only, Python 2.7, Protobuf 2.6
@@ -245,7 +246,7 @@ $ export SINGA_WHEEL_URL=http://comp.nus
 </pre></div>
 </div>
 <p>Then, run the following command</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span>$ sudo pip install --upgrade $SINGA_WHEEL_URL
+<div class="highlight-default"><div class="highlight"><pre>$ sudo pip install --upgrade $SINGA_WHEEL_URL
 </pre></div>
 </div>
 <p>If you do not have sudo right, you can run <code class="docutils literal"><span class="pre">pip</span> <span class="pre">install</span></code> in a python virtual environment.</p>
@@ -254,14 +255,14 @@ $ export SINGA_WHEEL_URL=http://comp.nus
 <span id="from-source"></span><h3>From source<a class="headerlink" href="#from-source" title="Permalink to this headline">¶</a></h3>
 <p>Please compile SINGA from source (see the next section) with the &#8216;USE_PYTHON&#8217; option on,
 and then run the following commands,</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span># under the build directory
+<div class="highlight-default"><div class="highlight"><pre># under the build directory
 $ cd python
 $ sudo pip install .
 </pre></div>
 </div>
 <p>If you are using a virtual environment, you can ignore the <code class="docutils literal"><span class="pre">sudo</span></code> keyword.</p>
 <p>Developers can build the wheel file via</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span># under the build directory
+<div class="highlight-default"><div class="highlight"><pre># under the build directory
 $ cd python
 $ python setup.py bdist_wheel
 </pre></div>
@@ -272,13 +273,13 @@ $ python setup.py bdist_wheel
 <div class="section" id="build-singa-from-source">
 <span id="build-singa-from-source"></span><h2>Build SINGA from source<a class="headerlink" href="#build-singa-from-source" title="Permalink to this headline">¶</a></h2>
 <p>Please clone the newest code from <a class="reference external" href="https://github.com/apache/incubator-singa">Github</a> and execute the following commands,</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span>$ git clone https://github.com/apache/incubator-singa.git
+<div class="highlight-default"><div class="highlight"><pre>$ git clone https://github.com/apache/incubator-singa.git
 $ cd incubator-singa/
 </pre></div>
 </div>
 <p>If you use CUDA, then <a class="reference external" href="https://github.com/NVIDIA/cnmem">CNMeM</a> is necessary,
 which could be downloaded as</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span>$ git submodule init
+<div class="highlight-default"><div class="highlight"><pre>$ git submodule init
 $ git submodule update
 </pre></div>
 </div>
@@ -287,7 +288,7 @@ $ git submodule update
 <p>GCC (&gt;=4.8.1) is required to compile SINGA on Linux.
 For Mac OS users, you can use either GCC or Clang.</p>
 <p>In SINGA_ROOT, execute the following commands for compiling SINGA,</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span>$ mkdir build &amp;&amp; cd build
+<div class="highlight-default"><div class="highlight"><pre>$ mkdir build &amp;&amp; cd build
 $ cmake ..
 $ make
 $ make install
@@ -295,7 +296,7 @@ $ make install
 </div>
 <p>Note that if you are using CUDNN and it is not installed under system default
 folder, you need to let cmake know the paths to CUDNN,</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span>$ export CMAKE_INCLUDE_PATH=&lt;path to cudnn&gt;/include:$CMAKE_INCLUDE_PATH
+<div class="highlight-default"><div class="highlight"><pre>$ export CMAKE_INCLUDE_PATH=&lt;path to cudnn&gt;/include:$CMAKE_INCLUDE_PATH
 $ export CMAKE_LIBRARY_PATH=&lt;path to cudnn&gt;/lib64:$CMAKE_LIBRARY_PATH
 </pre></div>
 </div>
@@ -303,12 +304,12 @@ $ export CMAKE_LIBRARY_PATH=&lt;path to
 generating python binding and changing the installation folder.
 If the dependent libraries are not in the system default paths, you need to export
 the following environment variables</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">export</span> <span class="n">CMAKE_INCLUDE_PATH</span><span class="o">=&lt;</span><span class="n">path</span> <span class="n">to</span> <span class="n">your</span> <span class="n">header</span> <span class="n">file</span> <span class="n">folder</span><span class="o">&gt;</span>
+<div class="highlight-default"><div class="highlight"><pre><span class="n">export</span> <span class="n">CMAKE_INCLUDE_PATH</span><span class="o">=&lt;</span><span class="n">path</span> <span class="n">to</span> <span class="n">your</span> <span class="n">header</span> <span class="n">file</span> <span class="n">folder</span><span class="o">&gt;</span>
 <span class="n">export</span> <span class="n">CMAKE_LIBRARY_PATH</span><span class="o">=&lt;</span><span class="n">path</span> <span class="n">to</span> <span class="n">your</span> <span class="n">lib</span> <span class="n">file</span> <span class="n">folder</span><span class="o">&gt;</span>
 </pre></div>
 </div>
 <p>After compiling SINGA, you can run the unit tests by</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span>$ ./bin/test_singa
+<div class="highlight-default"><div class="highlight"><pre>$ ./bin/test_singa
 </pre></div>
 </div>
 <p>You can see all the testing cases with testing results. If SINGA passes all
@@ -326,7 +327,7 @@ tests, then you have successfully instal
 <p>A: If you haven&#8217;t installed the libraries, please install them. If you installed
 the libraries in a folder that is outside of the system folder, e.g. /usr/local,
 please export the following variables</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span>  <span class="n">export</span> <span class="n">CMAKE_INCLUDE_PATH</span><span class="o">=&lt;</span><span class="n">path</span> <span class="n">to</span> <span class="n">your</span> <span class="n">header</span> <span class="n">file</span> <span class="n">folder</span><span class="o">&gt;</span>
+<div class="highlight-default"><div class="highlight"><pre>  <span class="n">export</span> <span class="n">CMAKE_INCLUDE_PATH</span><span class="o">=&lt;</span><span class="n">path</span> <span class="n">to</span> <span class="n">your</span> <span class="n">header</span> <span class="n">file</span> <span class="n">folder</span><span class="o">&gt;</span>
   <span class="n">export</span> <span class="n">CMAKE_LIBRARY_PATH</span><span class="o">=&lt;</span><span class="n">path</span> <span class="n">to</span> <span class="n">your</span> <span class="n">lib</span> <span class="n">file</span> <span class="n">folder</span><span class="o">&gt;</span>
 </pre></div>
 </div>
@@ -344,23 +345,23 @@ $ export LD_LIBRARY_PATH=<path to your l
 <li><p class="first">Q: Error from header files, e.g. &#8216;cblas.h no such file or directory exists&#8217;</p>
 <p>A: You need to include the folder of the cblas.h into CPLUS_INCLUDE_PATH,
 e.g.,</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span>  $ export CPLUS_INCLUDE_PATH=/opt/OpenBLAS/include:$CPLUS_INCLUDE_PATH
+<div class="highlight-default"><div class="highlight"><pre>  $ export CPLUS_INCLUDE_PATH=/opt/OpenBLAS/include:$CPLUS_INCLUDE_PATH
 </pre></div>
 </div>
 </li>
 <li><p class="first">Q:While compiling SINGA, I get error <code class="docutils literal"><span class="pre">SSE2</span> <span class="pre">instruction</span> <span class="pre">set</span> <span class="pre">not</span> <span class="pre">enabled</span></code></p>
 <p>A:You can try following command:</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span>  $ make CFLAGS=&#39;-msse2&#39; CXXFLAGS=&#39;-msse2&#39;
+<div class="highlight-default"><div class="highlight"><pre>  $ make CFLAGS=&#39;-msse2&#39; CXXFLAGS=&#39;-msse2&#39;
 </pre></div>
 </div>
 </li>
 <li><p class="first">Q:I get <code class="docutils literal"><span class="pre">ImportError:</span> <span class="pre">cannot</span> <span class="pre">import</span> <span class="pre">name</span> <span class="pre">enum_type_wrapper</span></code> from google.protobuf.internal when I try to import .py files.</p>
 <p>A: You need to install the python binding of protobuf, which could be installed via</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span>  $ sudo apt-get install protobuf
+<div class="highlight-default"><div class="highlight"><pre>  $ sudo apt-get install protobuf
 </pre></div>
 </div>
 <p>or from source</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span>  $ cd /PROTOBUF/SOURCE/FOLDER
+<div class="highlight-default"><div class="highlight"><pre>  $ cd /PROTOBUF/SOURCE/FOLDER
   $ cd python
   $ python setup.py build
   $ python setup.py install
@@ -369,11 +370,11 @@ e.g.,</p>
 </li>
 <li><p class="first">Q: When I build OpenBLAS from source, I am told that I need a Fortran compiler.</p>
 <p>A: You can compile OpenBLAS by</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span>  $ make ONLY_CBLAS=1
+<div class="highlight-default"><div class="highlight"><pre>  $ make ONLY_CBLAS=1
 </pre></div>
 </div>
 <p>or install it using</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span>  $ sudo apt-get install libopenblas-dev
+<div class="highlight-default"><div class="highlight"><pre>  $ sudo apt-get install libopenblas-dev
 </pre></div>
 </div>
 </li>
@@ -386,19 +387,19 @@ must be told how to find the newer libst
 The simplest way to fix this is to find the correct libstdc++ and export it to
 LD_LIBRARY_PATH. For example, if GLIBC++_3.4.20 is listed in the output of the
 following command,</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span>  $ strings /usr/local/lib64/libstdc++.so.6|grep GLIBC++
+<div class="highlight-default"><div class="highlight"><pre>  $ strings /usr/local/lib64/libstdc++.so.6|grep GLIBC++
 </pre></div>
 </div>
 <p>then you just set your environment variable as</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span>  $ export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH
+<div class="highlight-default"><div class="highlight"><pre>  $ export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH
 </pre></div>
 </div>
 </li>
 <li><p class="first">Q: When I build glog, it reports that &#8220;src/logging_unittest.cc:83:20: error: ‘gflags’ is not a namespace-name&#8221;</p>
 <p>A: It maybe that you have installed gflags with a different namespace such as &#8220;google&#8221;. so glog can&#8217;t find &#8216;gflags&#8217; namespace.
 Because it is not necessary to have gflags to build glog. So you can change the configure.ac file to ignore gflags.</p>
-<div class="highlight-default"><div class="highlight"><pre><span></span>  <span class="mf">1.</span> <span class="n">cd</span> <span class="n">to</span> <span class="n">glog</span> <span class="n">src</span> <span class="n">directory</span>
-  <span class="mf">2.</span> <span class="n">change</span> <span class="n">line</span> <span class="mi">125</span> <span class="n">of</span> <span class="n">configure</span><span class="o">.</span><span class="n">ac</span>  <span class="n">to</span> <span class="s2">&quot;AC_CHECK_LIB(gflags, main, ac_cv_have_libgflags=0, ac_cv_have_libgflags=0)&quot;</span>
+<div class="highlight-default"><div class="highlight"><pre>  <span class="mf">1.</span> <span class="n">cd</span> <span class="n">to</span> <span class="n">glog</span> <span class="n">src</span> <span class="n">directory</span>
+  <span class="mf">2.</span> <span class="n">change</span> <span class="n">line</span> <span class="mi">125</span> <span class="n">of</span> <span class="n">configure</span><span class="o">.</span><span class="n">ac</span>  <span class="n">to</span> <span class="s">&quot;AC_CHECK_LIB(gflags, main, ac_cv_have_libgflags=0, ac_cv_have_libgflags=0)&quot;</span>
   <span class="mf">3.</span> <span class="n">autoreconf</span>
 </pre></div>
 </div>



Mime
View raw message