Modified: incubator/singa/site/trunk/en/docs/cnn.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/cnn.html?rev=1831195&r1=1831194&r2=1831195&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/cnn.html (original) +++ incubator/singa/site/trunk/en/docs/cnn.html Tue May 8 15:05:16 2018 @@ -14,27 +14,22 @@ - - - - - <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 rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <link rel="index" title="Index" href="../genindex.html" /> + <link rel="search" title="Search" href="../search.html" /> <link href="../_static/style.css" rel="stylesheet" type="text/css"> @@ -43,8 +38,9 @@ </head> -<body class="wy-body-for-nav" role="document"> +<body class="wy-body-for-nav"> + <div class="wy-grid-for-nav"> @@ -59,7 +55,7 @@ - <img src="../_static/singa.png" class="logo" /> + <img src="../_static/singa.png" class="logo" alt="Logo"/> </a> @@ -88,7 +84,10 @@ - <ul> + + + + <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> @@ -116,32 +115,52 @@ <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 class="wy-nav-top" 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> »</li> - - <li>Quickstart - Cifar10 example</li> + + <li><a href="../index.html">Docs</a> »</li> + + <li>Quickstart - Cifar10 example</li> + + <li class="wy-breadcrumbs-aside"> - + </li> + </ul> + + <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> @@ -154,26 +173,26 @@ <span id="running-instructions-for-cpp-version"></span><h2>Running instructions for CPP version<a class="headerlink" href="#running-instructions-for-cpp-version" title="Permalink to this headline">¶</a></h2> <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 notranslate"><div class="highlight"><pre><span></span># switch to cifar10 directory $ cd ../examples/cifar10 # download data for CPP version $ python download_data.py bin </pre></div> </div> -<p>‘bin’ is for downloading binary version of Cifar10 data.</p> +<p>âbinâ 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 notranslate"><div class="highlight"><pre><span></span> 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/ +<p>Now you have prepared the data for this Cifar10 example, the final step is to execute the <code class="docutils literal notranslate"><span class="pre">run.sh</span></code> script,</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span># 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> +<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 notranslate"><span class="pre">run.sh</span></code> file.</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><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> @@ -214,35 +233,35 @@ $ ./run.sh <span class="n">Epoch</span> <span class="mi">3</span><span class="p">,</span> <span class="n">val</span> <span class="n">loss</span> <span class="o">=</span> <span class="mf">1.175346</span><span class="p">,</span> <span class="n">metric</span> <span class="o">=</span> <span class="mf">0.582000</span> </pre></div> </div> -<p>The training details are stored in <code class="docutils literal"><span class="pre">train_perf</span></code> file in the same directory and the validation details in <code class="docutils literal"><span class="pre">val_perf</span></code> file.</p> +<p>The training details are stored in <code class="docutils literal notranslate"><span class="pre">train_perf</span></code> file in the same directory and the validation details in <code class="docutils literal notranslate"><span class="pre">val_perf</span></code> file.</p> </div> <div class="section" id="running-instructions-for-python-version"> <span id="running-instructions-for-python-version"></span><h2>Running instructions for Python version<a class="headerlink" href="#running-instructions-for-python-version" title="Permalink to this headline">¶</a></h2> <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 && cd build +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ mkdir build && 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 notranslate"><div class="highlight"><pre><span></span># 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 notranslate"><div class="highlight"><pre><span></span> 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 +<p>Then execute the <code class="docutils literal notranslate"><span class="pre">train.py</span></code> script to build the model</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ 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 notranslate"><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> <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> @@ -284,8 +303,8 @@ $ python download_data.py py <span class="n">test</span> <span class="n">loss</span> <span class="o">=</span> <span class="mf">1.211573</span><span class="p">,</span> <span class="n">test</span> <span class="n">accuracy</span> <span class="o">=</span> <span class="mf">0.567600</span> </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 +<p>This script will call <code class="docutils literal notranslate"><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 notranslate"><span class="pre">model.bin</span></code> in the same directory. Then we can use this <code class="docutils literal notranslate"><span class="pre">model.bin</span></code> file for prediction.</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ python predict.py </pre></div> </div> </div> @@ -293,6 +312,7 @@ $ python download_data.py py </div> + </div> <footer> @@ -301,11 +321,11 @@ $ python download_data.py py <div role="contentinfo"> <p> - © 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.. + © Copyright 2018 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>. + Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. </footer> @@ -324,9 +344,11 @@ $ python download_data.py py var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', VERSION:'1.1.0', + LANGUAGE:'None', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', - HAS_SOURCE: true + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt' }; </script> <script type="text/javascript" src="../_static/jquery.js"></script> @@ -340,14 +362,13 @@ $ python download_data.py py <script type="text/javascript" src="../_static/js/theme.js"></script> - - <script type="text/javascript"> jQuery(function () { - SphinxRtdTheme.StickyNav.enable(); + + SphinxRtdTheme.Navigation.enableSticky(); + }); </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">
Modified: incubator/singa/site/trunk/en/docs/converter.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/converter.html?rev=1831195&r1=1831194&r2=1831195&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/converter.html (original) +++ incubator/singa/site/trunk/en/docs/converter.html Tue May 8 15:05:16 2018 @@ -14,30 +14,24 @@ - - - - - <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 rel="up" title="Documentation" href="index.html"/> - <link rel="next" title="Utils" href="utils.html"/> - <link rel="prev" title="Snapshot" href="snapshot.html"/> + <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <link rel="index" title="Index" href="../genindex.html" /> + <link rel="search" title="Search" href="../search.html" /> + <link rel="next" title="Utils" href="utils.html" /> + <link rel="prev" title="Snapshot" href="snapshot.html" /> <link href="../_static/style.css" rel="stylesheet" type="text/css"> @@ -46,8 +40,9 @@ </head> -<body class="wy-body-for-nav" role="document"> +<body class="wy-body-for-nav"> + <div class="wy-grid-for-nav"> @@ -62,7 +57,7 @@ - <img src="../_static/singa.png" class="logo" /> + <img src="../_static/singa.png" class="logo" alt="Logo"/> </a> @@ -91,7 +86,10 @@ - <ul class="current"> + + + + <ul class="current"> <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> @@ -137,54 +135,75 @@ <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 class="wy-nav-top" 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> »</li> - + + <li><a href="../index.html">Docs</a> »</li> + <li><a href="index.html">Documentation</a> »</li> - - <li>Caffe Converter</li> + + <li>Caffe Converter</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"> - <div class="section" id="module-singa.converter"> -<span id="caffe-converter"></span><h1>Caffe Converter<a class="headerlink" href="#module-singa.converter" title="Permalink to this headline">¶</a></h1> + <div class="section" id="caffe-converter"> +<h1>Caffe Converter<a class="headerlink" href="#caffe-converter" title="Permalink to this headline">¶</a></h1> </div> </div> + </div> <footer> <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> - <a href="utils.html" class="btn btn-neutral float-right" title="Utils" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a> + <a href="utils.html" class="btn btn-neutral float-right" title="Utils" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> - <a href="snapshot.html" class="btn btn-neutral" title="Snapshot" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a> + <a href="snapshot.html" class="btn btn-neutral" title="Snapshot" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> </div> @@ -193,11 +212,11 @@ <div role="contentinfo"> <p> - © 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.. + © Copyright 2018 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>. + Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. </footer> @@ -216,9 +235,11 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', VERSION:'1.1.0', + LANGUAGE:'None', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', - HAS_SOURCE: true + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt' }; </script> <script type="text/javascript" src="../_static/jquery.js"></script> @@ -232,14 +253,13 @@ <script type="text/javascript" src="../_static/js/theme.js"></script> - - <script type="text/javascript"> jQuery(function () { - SphinxRtdTheme.StickyNav.enable(); + + SphinxRtdTheme.Navigation.enableSticky(); + }); </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"> Modified: incubator/singa/site/trunk/en/docs/data.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/data.html?rev=1831195&r1=1831194&r2=1831195&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/data.html (original) +++ incubator/singa/site/trunk/en/docs/data.html Tue May 8 15:05:16 2018 @@ -14,30 +14,24 @@ - - - - - <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 rel="up" title="Documentation" href="index.html"/> - <link rel="next" title="Image Tool" href="image_tool.html"/> - <link rel="prev" title="Optimizer" href="optimizer.html"/> + <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <link rel="index" title="Index" href="../genindex.html" /> + <link rel="search" title="Search" href="../search.html" /> + <link rel="next" title="Image Tool" href="image_tool.html" /> + <link rel="prev" title="Optimizer" href="optimizer.html" /> <link href="../_static/style.css" rel="stylesheet" type="text/css"> @@ -46,8 +40,9 @@ </head> -<body class="wy-body-for-nav" role="document"> +<body class="wy-body-for-nav"> + <div class="wy-grid-for-nav"> @@ -62,7 +57,7 @@ - <img src="../_static/singa.png" class="logo" /> + <img src="../_static/singa.png" class="logo" alt="Logo"/> </a> @@ -91,7 +86,10 @@ - <ul class="current"> + + + + <ul class="current"> <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> @@ -137,110 +135,75 @@ <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 class="wy-nav-top" 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> »</li> - + + <li><a href="../index.html">Docs</a> »</li> + <li><a href="index.html">Documentation</a> »</li> - - <li>Data</li> + + <li>Data</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"> - <div class="section" id="module-singa.data"> -<span id="data"></span><h1>Data<a class="headerlink" href="#module-singa.data" title="Permalink to this headline">¶</a></h1> -<p>This module includes classes for loading and prefetching data batches.</p> -<p>Example usage:</p> -<div class="highlight-default"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">image_tool</span> -<span class="kn">from</span> <span class="nn">PIL</span> <span class="k">import</span> <span class="n">Image</span> - -<span class="n">tool</span> <span class="o">=</span> <span class="n">image_tool</span><span class="o">.</span><span class="n">ImageTool</span><span class="p">()</span> - -<span class="k">def</span> <span class="nf">image_transform</span><span class="p">(</span><span class="n">img_path</span><span class="p">):</span> - <span class="k">global</span> <span class="n">tool</span> - <span class="k">return</span> <span class="n">tool</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="n">img_path</span><span class="p">)</span><span class="o">.</span><span class="n">resize_by_range</span><span class="p">(</span> - <span class="p">(</span><span class="mi">112</span><span class="p">,</span> <span class="mi">128</span><span class="p">))</span><span class="o">.</span><span class="n">random_crop</span><span class="p">(</span> - <span class="p">(</span><span class="mi">96</span><span class="p">,</span> <span class="mi">96</span><span class="p">))</span><span class="o">.</span><span class="n">flip</span><span class="p">()</span><span class="o">.</span><span class="n">get</span><span class="p">()</span> - -<span class="n">data</span> <span class="o">=</span> <span class="n">ImageBatchIter</span><span class="p">(</span><span class="s1">'train.txt'</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> - <span class="n">image_transform</span><span class="p">,</span> <span class="n">shuffle</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">delimiter</span><span class="o">=</span><span class="s1">','</span><span class="p">,</span> - <span class="n">image_folder</span><span class="o">=</span><span class="s1">'images/'</span><span class="p">,</span> - <span class="n">capacity</span><span class="o">=</span><span class="mi">10</span><span class="p">)</span> -<span class="n">data</span><span class="o">.</span><span class="n">start</span><span class="p">()</span> -<span class="c1"># imgs is a numpy array for a batch of images,</span> -<span class="c1"># shape: batch_size, 3 (RGB), height, width</span> -<span class="n">imgs</span><span class="p">,</span> <span class="n">labels</span> <span class="o">=</span> <span class="n">data</span><span class="o">.</span><span class="n">next</span><span class="p">()</span> - -<span class="c1"># convert numpy array back into images</span> -<span class="k">for</span> <span class="n">idx</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">imgs</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">]):</span> - <span class="n">img</span> <span class="o">=</span> <span class="n">Image</span><span class="o">.</span><span class="n">fromarray</span><span class="p">(</span><span class="n">imgs</span><span class="p">[</span><span class="n">idx</span><span class="p">]</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">uint8</span><span class="p">)</span><span class="o">.</span><span class="n">transpose</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> - <span class="s1">'RGB'</span><span class="p">)</span> - <span class="n">img</span><span class="o">.</span><span class="n">save</span><span class="p">(</span><span class="s1">'img</span><span class="si">%d</span><span class="s1">.png'</span> <span class="o">%</span> <span class="n">idx</span><span class="p">)</span> -<span class="n">data</span><span class="o">.</span><span class="n">end</span><span class="p">()</span> -</pre></div> -</div> -<dl class="class"> -<dt id="singa.data.ImageBatchIter"> -<em class="property">class </em><code class="descclassname">singa.data.</code><code class="descname">ImageBatchIter</code><span class="sig-paren">(</span><em>img_list_file</em>, <em>batch_size</em>, <em>image_transform</em>, <em>shuffle=True</em>, <em>delimiter=' '</em>, <em>image_folder=None</em>, <em>capacity=10</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.data.ImageBatchIter" title="Permalink to this definition">¶</a></dt> -<dd><p>Utility for iterating over an image dataset to get mini-batches.</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>img_list_file</strong> (<em>str</em>) – name of the file containing image meta data; each -line consists of image_path_suffix delimiter label</li> -<li><strong>batch_size</strong> (<em>int</em>) – num of samples in one mini-batch</li> -<li><strong>image_transform</strong> – a function for image augmentation; it accepts the full -image path and outputs a list of augmented images.</li> -<li><strong>shuffle</strong> (<em>boolean</em>) – True for shuffling images in the list</li> -<li><strong>delimiter</strong> (<em>char</em>) – delimiter between image_path_suffix and label, e.g., -space or comma</li> -<li><strong>image_folder</strong> (<em>boolean</em>) – prefix of the image path</li> -<li><strong>capacity</strong> (<em>int</em>) – the max num of mini-batches in the internal queue.</li> -</ul> -</td> -</tr> -</tbody> -</table> -</dd></dl> - + <div class="section" id="data"> +<h1>Data<a class="headerlink" href="#data" title="Permalink to this headline">¶</a></h1> </div> </div> + </div> <footer> <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> - <a href="image_tool.html" class="btn btn-neutral float-right" title="Image Tool" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a> + <a href="image_tool.html" class="btn btn-neutral float-right" title="Image Tool" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> - <a href="optimizer.html" class="btn btn-neutral" title="Optimizer" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a> + <a href="optimizer.html" class="btn btn-neutral" title="Optimizer" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> </div> @@ -249,11 +212,11 @@ space or comma</li> <div role="contentinfo"> <p> - © 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.. + © Copyright 2018 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>. + Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. </footer> @@ -272,9 +235,11 @@ space or comma</li> var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', VERSION:'1.1.0', + LANGUAGE:'None', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', - HAS_SOURCE: true + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt' }; </script> <script type="text/javascript" src="../_static/jquery.js"></script> @@ -288,14 +253,13 @@ space or comma</li> <script type="text/javascript" src="../_static/js/theme.js"></script> - - <script type="text/javascript"> jQuery(function () { - SphinxRtdTheme.StickyNav.enable(); + + SphinxRtdTheme.Navigation.enableSticky(); + }); </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"> Modified: incubator/singa/site/trunk/en/docs/dependencies.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/dependencies.html?rev=1831195&r1=1831194&r2=1831195&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/dependencies.html (original) +++ incubator/singa/site/trunk/en/docs/dependencies.html Tue May 8 15:05:16 2018 @@ -14,27 +14,22 @@ - - - - - <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 rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <link rel="index" title="Index" href="../genindex.html" /> + <link rel="search" title="Search" href="../search.html" /> <link href="../_static/style.css" rel="stylesheet" type="text/css"> @@ -43,8 +38,9 @@ </head> -<body class="wy-body-for-nav" role="document"> +<body class="wy-body-for-nav"> + <div class="wy-grid-for-nav"> @@ -59,7 +55,7 @@ - <img src="../_static/singa.png" class="logo" /> + <img src="../_static/singa.png" class="logo" alt="Logo"/> </a> @@ -88,7 +84,10 @@ - <ul> + + + + <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> @@ -116,32 +115,52 @@ <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 class="wy-nav-top" 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> »</li> - - <li>Dependent library installation</li> + + <li><a href="../index.html">Docs</a> »</li> + + <li>Dependent library installation</li> + + <li class="wy-breadcrumbs-aside"> - + </li> + </ul> + + <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> @@ -156,7 +175,7 @@ windows system from source codes. The fo previous VS does not support <a class="reference external" href="https://msdn.microsoft.com/en-us/library/hh567368.aspx">C++11 features</a> well (including generic lambdas, auto, non-static data member initializers). If you intend to generate a 32-bit/64-bit singa solution, please configure all the VS projects for the dependent libraries as 32-bit/64-bit. This can be done by -“Configuration Manager” in VS 2015 or use corresponding generator in cmake. When compiling the following libraries, you +âConfiguration Managerâ in VS 2015 or use corresponding generator in cmake. When compiling the following libraries, you may get system-specific warnings/errors. Please fix them according to the prompts by VS.</p> <div class="section" id="google-logging"> @@ -164,12 +183,12 @@ prompts by VS.</p> <p>The glog library is an optional library for singa project. But it is currently necessary for Window compilation. Since the latest release version of glog will encounter error C2084 on sprintf function under VS2015, we test the compilation and installation using the master branch from <a class="reference external" href="https://github.com/google/glog">github</a>.</p> -<p>Step 1: Download and decompress the source code. Or use <code class="docutils literal"><span class="pre">git</span> <span class="pre">clone</span> <span class="pre">https://github.com/google/glog</span></code> to get the code.</p> -<p>Step 2: Open “glog.sln” file under project folder. You will get a conversion +<p>Step 1: Download and decompress the source code. Or use <code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">clone</span> <span class="pre">https://github.com/google/glog</span></code> to get the code.</p> +<p>Step 2: Open âglog.slnâ file under project folder. You will get a conversion dialog and please finish it by the prompts. Compile all the projects in the solution after -proper configuration, especially “libglog” and “libglog_static” projects.</p> -<p>Step 3: Copy all the header files and the entire directory named “glog” under -“src\windows“ folder into the installation include folder (or system folder). +proper configuration, especially âlibglogâ and âlibglog_staticâ projects.</p> +<p>Step 3: Copy all the header files and the entire directory named âglogâ under +âsrc\windowsâ folder into the installation include folder (or system folder). Copy all the generated library files into the installation library folder (or system folder).</p> <p>Step 4: Done.</p> @@ -178,16 +197,16 @@ system folder).</p> <span id="google-protobuf"></span><h3>Google protobuf<a class="headerlink" href="#google-protobuf" title="Permalink to this headline">¶</a></h3> <p>Tested on version 2.6.1:</p> <p>Step 1: Download and decompress the source code.</p> -<p>Step 2: Open “protobuf.sln” file under “vsprojects” folder. You will get a conversion +<p>Step 2: Open âprotobuf.slnâ file under âvsprojectsâ folder. You will get a conversion dialog and please finish it by the prompts. Compile all the projects in the solution after proper -configuration. Especially “libprotobuf”, “libprotobuf-lite”, “libprotoc” and -“protoc” projects.</p> -<p>Step 3: Run “extract_includes.bat” script under “vsprojects” folder, you will -get a new “include” folder with all the headers.</p> -<p>Step 4: Copy the library files, such as “libprotobuf.lib”, -“libprotobuf-lite.lib”, “libprotoc.lib”, etc., into your installation library folder (or -system folder). Copy the binary file “protoc” into your installation binary -folder (or system folder). Copy all the headers and folders in “include” folder into your +configuration. Especially âlibprotobufâ, âlibprotobuf-liteâ, âlibprotocâ and +âprotocâ projects.</p> +<p>Step 3: Run âextract_includes.batâ script under âvsprojectsâ folder, you will +get a new âincludeâ folder with all the headers.</p> +<p>Step 4: Copy the library files, such as âlibprotobuf.libâ, +âlibprotobuf-lite.libâ, âlibprotoc.libâ, etc., into your installation library folder (or +system folder). Copy the binary file âprotocâ into your installation binary +folder (or system folder). Copy all the headers and folders in âincludeâ folder into your installation include folder (or system folder).</p> <p>Step 5: Done.</p> </div> @@ -199,14 +218,14 @@ OpenBLAS with version 0.2.18 as test:</p <p>Step 1: Download and decompress the source code.</p> <p>Step 2: Start a cmd window under the OpenBLAS folder then run the following commands to generate the solution:</p> -<div class="highlight-default"><div class="highlight"><pre><span></span>$ md build $$ cd build +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ md build $$ cd build $ cmake -G "Visual Studio 14" .. </pre></div> </div> -<p>Or run <code class="docutils literal"><span class="pre">cmake</span> <span class="pre">-G</span> <span class="pre">"Visual</span> <span class="pre">Studio</span> <span class="pre">14</span> <span class="pre">Win64"</span></code> as you wish.</p> -<p>Step 3: Install Perl into your system and put perl.exe on your path. Open “OpenBlas.sln” and build the solution, especially “libopenblas” +<p>Or run <code class="docutils literal notranslate"><span class="pre">cmake</span> <span class="pre">-G</span> <span class="pre">"Visual</span> <span class="pre">Studio</span> <span class="pre">14</span> <span class="pre">Win64"</span></code> as you wish.</p> +<p>Step 3: Install Perl into your system and put perl.exe on your path. Open âOpenBlas.slnâ and build the solution, especially âlibopenblasâ project.</p> -<p>Step 4: Copy the library files under “build\lib” folder and all header files +<p>Step 4: Copy the library files under âbuild\libâ folder and all header files under OpenBLAS folder into installation library and include folders (or system folders).</p> <p>Step 5: Done.</p> @@ -215,11 +234,11 @@ folders).</p> <div class="section" id="faq"> <span id="faq"></span><h2>FAQ<a class="headerlink" href="#faq" title="Permalink to this headline">¶</a></h2> <ol> -<li><p class="first">Error C2375 ‘snprintf’: redefinition; different linkage</p> +<li><p class="first">Error C2375 âsnprintfâ: redefinition; different linkage</p> <p>Add âHAVE_SNPRINTFâ to âC/C++ - Preprocessor - Preprocessor definitionsâ</p> </li> <li><p class="first">Error due to hash map</p> -<p>Add “_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS” to Preprocessor Definitions.</p> +<p>Add â_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGSâ to Preprocessor Definitions.</p> </li> </ol> </div> @@ -227,6 +246,7 @@ folders).</p> </div> + </div> <footer> @@ -235,11 +255,11 @@ folders).</p> <div role="contentinfo"> <p> - © 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.. + © Copyright 2018 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>. + Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. </footer> @@ -258,9 +278,11 @@ folders).</p> var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', VERSION:'1.1.0', + LANGUAGE:'None', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', - HAS_SOURCE: true + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt' }; </script> <script type="text/javascript" src="../_static/jquery.js"></script> @@ -274,14 +296,13 @@ folders).</p> <script type="text/javascript" src="../_static/js/theme.js"></script> - - <script type="text/javascript"> jQuery(function () { - SphinxRtdTheme.StickyNav.enable(); + + SphinxRtdTheme.Navigation.enableSticky(); + }); </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"> Modified: incubator/singa/site/trunk/en/docs/device.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/device.html?rev=1831195&r1=1831194&r2=1831195&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/device.html (original) +++ incubator/singa/site/trunk/en/docs/device.html Tue May 8 15:05:16 2018 @@ -14,30 +14,24 @@ - - - - - <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 rel="up" title="Documentation" href="index.html"/> - <link rel="next" title="Tensor" href="tensor.html"/> - <link rel="prev" title="Software Stack" href="software_stack.html"/> + <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <link rel="index" title="Index" href="../genindex.html" /> + <link rel="search" title="Search" href="../search.html" /> + <link rel="next" title="Tensor" href="tensor.html" /> + <link rel="prev" title="Software Stack" href="software_stack.html" /> <link href="../_static/style.css" rel="stylesheet" type="text/css"> @@ -46,8 +40,9 @@ </head> -<body class="wy-body-for-nav" role="document"> +<body class="wy-body-for-nav"> + <div class="wy-grid-for-nav"> @@ -62,7 +57,7 @@ - <img src="../_static/singa.png" class="logo" /> + <img src="../_static/singa.png" class="logo" alt="Logo"/> </a> @@ -91,14 +86,17 @@ - <ul class="current"> + + + + <ul class="current"> <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"><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="#module-singa.device">Python API</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="#cpp-api">CPP API</a></li> </ul> </li> @@ -142,34 +140,54 @@ <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 class="wy-nav-top" 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> »</li> - + + <li><a href="../index.html">Docs</a> »</li> + <li><a href="index.html">Documentation</a> »</li> - - <li>Device</li> + + <li>Device</li> + + <li class="wy-breadcrumbs-aside"> - + </li> + </ul> + + <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> @@ -179,7 +197,7 @@ <h1>Device<a class="headerlink" href="#device" title="Permalink to this headline">¶</a></h1> <p>The Device abstract represents any hardware device with memory and compuation units. All [Tensor operations](tensor.html) are scheduled by the resident device for execution. -Tensor memory is also managed by the device’s memory manager. Therefore, optimization +Tensor memory is also managed by the deviceâs memory manager. Therefore, optimization of memory and execution are implemented in the Device class.</p> <div class="section" id="specific-devices"> <h2>Specific devices<a class="headerlink" href="#specific-devices" title="Permalink to this headline">¶</a></h2> @@ -190,51 +208,10 @@ of memory and execution are implemented <li>OpenclGPU for a GPU card which runs OpenCL code</li> </ol> </div> -<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>) – 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>) – 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> - +<div class="section" id="python-api"> +<h2>Python API<a class="headerlink" href="#python-api" title="Permalink to this headline">¶</a></h2> <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> +<div class="highlight-default notranslate"><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> @@ -249,15 +226,16 @@ to call singa::Device and its methods.</ </div> + </div> <footer> <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> - <a href="tensor.html" class="btn btn-neutral float-right" title="Tensor" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a> + <a href="tensor.html" class="btn btn-neutral float-right" title="Tensor" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> - <a href="software_stack.html" class="btn btn-neutral" title="Software Stack" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a> + <a href="software_stack.html" class="btn btn-neutral" title="Software Stack" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> </div> @@ -266,11 +244,11 @@ to call singa::Device and its methods.</ <div role="contentinfo"> <p> - © 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.. + © Copyright 2018 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>. + Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. </footer> @@ -289,9 +267,11 @@ to call singa::Device and its methods.</ var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', VERSION:'1.1.0', + LANGUAGE:'None', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', - HAS_SOURCE: true + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt' }; </script> <script type="text/javascript" src="../_static/jquery.js"></script> @@ -305,14 +285,13 @@ to call singa::Device and its methods.</ <script type="text/javascript" src="../_static/js/theme.js"></script> - - <script type="text/javascript"> jQuery(function () { - SphinxRtdTheme.StickyNav.enable(); + + SphinxRtdTheme.Navigation.enableSticky(); + }); </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"> Modified: incubator/singa/site/trunk/en/docs/docker.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/docker.html?rev=1831195&r1=1831194&r2=1831195&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/docker.html (original) +++ incubator/singa/site/trunk/en/docs/docker.html Tue May 8 15:05:16 2018 @@ -14,27 +14,22 @@ - - - - - <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 rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <link rel="index" title="Index" href="../genindex.html" /> + <link rel="search" title="Search" href="../search.html" /> <link href="../_static/style.css" rel="stylesheet" type="text/css"> @@ -43,8 +38,9 @@ </head> -<body class="wy-body-for-nav" role="document"> +<body class="wy-body-for-nav"> + <div class="wy-grid-for-nav"> @@ -59,7 +55,7 @@ - <img src="../_static/singa.png" class="logo" /> + <img src="../_static/singa.png" class="logo" alt="Logo"/> </a> @@ -88,7 +84,10 @@ - <ul> + + + + <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> @@ -116,32 +115,52 @@ <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 class="wy-nav-top" 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> »</li> - - <li>Docker Images</li> + + <li><a href="../index.html">Docs</a> »</li> + + <li>Docker Images</li> + + <li class="wy-breadcrumbs-aside"> - + </li> + </ul> + + <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> @@ -152,39 +171,39 @@ <div class="section" id="available-tags"> <span id="available-tags"></span><h2>Available tags<a class="headerlink" href="#available-tags" title="Permalink to this headline">¶</a></h2> <ul class="simple"> -<li><code class="docutils literal"><span class="pre">devel</span></code>, with SINGA and the development packages installed on Ubuntu16.04 (no GPU)</li> -<li><code class="docutils literal"><span class="pre">devel-cuda</span></code>, with SINGA, CUDA8.0, CUDNN5, and other development packages installed on Ubuntu16.04</li> +<li><code class="docutils literal notranslate"><span class="pre">devel</span></code>, with SINGA and the development packages installed on Ubuntu16.04 (no GPU)</li> +<li><code class="docutils literal notranslate"><span class="pre">devel-cuda</span></code>, with SINGA, CUDA8.0, CUDNN5, and other development packages installed on Ubuntu16.04</li> </ul> </div> <div class="section" id="use-the-existing-docker-images"> <span id="use-the-existing-docker-images"></span><h2>Use the existing Docker images<a class="headerlink" href="#use-the-existing-docker-images" title="Permalink to this headline">¶</a></h2> <p>Users can pull the Docker images from Dockerhub via</p> -<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">docker</span> <span class="n">pull</span> <span class="n">apache</span><span class="o">/</span><span class="n">singa</span><span class="p">:</span><span class="n">devel</span> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">docker</span> <span class="n">pull</span> <span class="n">apache</span><span class="o">/</span><span class="n">singa</span><span class="p">:</span><span class="n">devel</span> <span class="c1"># or</span> <span class="n">docker</span> <span class="n">pull</span> <span class="n">apache</span><span class="o">/</span><span class="n">singa</span><span class="p">:</span><span class="n">devel</span><span class="o">-</span><span class="n">cuda</span> </pre></div> </div> <p>Run the docker container using</p> -<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">docker</span> <span class="n">run</span> <span class="o">-</span><span class="n">it</span> <span class="n">apache</span><span class="o">/</span><span class="n">singa</span><span class="p">:</span><span class="n">devel</span> <span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">bash</span> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">docker</span> <span class="n">run</span> <span class="o">-</span><span class="n">it</span> <span class="n">apache</span><span class="o">/</span><span class="n">singa</span><span class="p">:</span><span class="n">devel</span> <span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">bash</span> <span class="c1"># or</span> <span class="n">docker</span> <span class="n">run</span> <span class="o">-</span><span class="n">it</span> <span class="n">apache</span><span class="o">/</span><span class="n">singa</span><span class="p">:</span><span class="n">devel</span><span class="o">-</span><span class="n">cuda</span> <span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">bash</span> </pre></div> </div> -<p>The latest SINGA code is under the <code class="docutils literal"><span class="pre">incubator-singa</span></code> folder.</p> +<p>The latest SINGA code is under the <code class="docutils literal notranslate"><span class="pre">incubator-singa</span></code> folder.</p> </div> <div class="section" id="create-new-docker-images-from-dockerfile"> <span id="create-new-docker-images-from-dockerfile"></span><h2>Create new Docker images from Dockerfile<a class="headerlink" href="#create-new-docker-images-from-dockerfile" title="Permalink to this headline">¶</a></h2> <p>New Docker images could be created by executing the following command within the Dockerfile folder, e.g., tool/docker/devel/</p> -<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">docker</span> <span class="n">build</span> <span class="o">-</span><span class="n">t</span> <span class="n">singa</span><span class="p">:</span><span class="o"><</span><span class="n">TAG</span><span class="o">></span> <span class="o">-</span><span class="n">f</span> <span class="n">Dockerfile</span> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">docker</span> <span class="n">build</span> <span class="o">-</span><span class="n">t</span> <span class="n">singa</span><span class="p">:</span><span class="o"><</span><span class="n">TAG</span><span class="o">></span> <span class="o">-</span><span class="n">f</span> <span class="n">Dockerfile</span> </pre></div> </div> -<p>The <code class="docutils literal"><span class="pre"><TAG></span></code> is named as</p> -<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">devel</span><span class="o">|</span><span class="n">runtime</span><span class="p">[</span><span class="o">-</span><span class="n">OS</span><span class="p">][</span><span class="o">-</span><span class="n">CUDA</span><span class="o">|</span><span class="n">OPENCL</span><span class="p">][</span><span class="o">-</span><span class="n">CUDNN</span><span class="p">]</span> +<p>The <code class="docutils literal notranslate"><span class="pre"><TAG></span></code> is named as</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">devel</span><span class="o">|</span><span class="n">runtime</span><span class="p">[</span><span class="o">-</span><span class="n">OS</span><span class="p">][</span><span class="o">-</span><span class="n">CUDA</span><span class="o">|</span><span class="n">OPENCL</span><span class="p">][</span><span class="o">-</span><span class="n">CUDNN</span><span class="p">]</span> </pre></div> </div> <ul class="simple"> -<li>devel: development images with all dependent libs’ header files installed and SINGA’s source code; runtime: the minimal images which can run SINGA programs.</li> +<li>devel: development images with all dependent libsâ header files installed and SINGAâs source code; runtime: the minimal images which can run SINGA programs.</li> <li>OS: ubuntu, ubuntu14.04, centos, centos6</li> <li>CUDA: cuda, cuda8.0, cuda7.0</li> <li>CUDNN: cudnn, cudnn5, cudnn4</li> @@ -194,21 +213,22 @@ Dockerfile folder, e.g., tool/docker/dev The default OS is Ubuntu. The version is the latest stable version (e.g., 16.04 for now). For -cuda version, the <strong>cudnn</strong> is included by default. Their versions are also the latest stable version, i.e., cuda8.0 and cudnn5 for now.</p> <p>Here are some example tags,</p> -<p><code class="docutils literal"><span class="pre">devel</span></code>, <code class="docutils literal"><span class="pre">devel-cuda</span></code>, <code class="docutils literal"><span class="pre">runtime</span></code>, <code class="docutils literal"><span class="pre">runtime-cuda</span></code>, <code class="docutils literal"><span class="pre">devel-centos7-cuda</span></code>, <code class="docutils literal"><span class="pre">devel-ubuntu14.04</span></code>, <code class="docutils literal"><span class="pre">devel-ubuntu14.04-cuda7.5-cudnn4</span></code></p> +<p><code class="docutils literal notranslate"><span class="pre">devel</span></code>, <code class="docutils literal notranslate"><span class="pre">devel-cuda</span></code>, <code class="docutils literal notranslate"><span class="pre">runtime</span></code>, <code class="docutils literal notranslate"><span class="pre">runtime-cuda</span></code>, <code class="docutils literal notranslate"><span class="pre">devel-centos7-cuda</span></code>, <code class="docutils literal notranslate"><span class="pre">devel-ubuntu14.04</span></code>, <code class="docutils literal notranslate"><span class="pre">devel-ubuntu14.04-cuda7.5-cudnn4</span></code></p> <p>Please follow the existing Dockefiles under tool/docker/ to create other Dockefiles. The folder structure is like</p> -<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">level1</span><span class="p">:</span> <span class="n">devel</span><span class="o">|</span><span class="n">runtime</span> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">level1</span><span class="p">:</span> <span class="n">devel</span><span class="o">|</span><span class="n">runtime</span> <span class="n">level2</span><span class="p">:</span> <span class="n">Dockerfile</span><span class="p">,</span> <span class="n">OS</span> <span class="n">level3</span><span class="p">:</span> <span class="n">Dockerfile</span><span class="p">,</span> <span class="n">CUDA</span><span class="o">|</span><span class="n">OPENCL</span> <span class="n">level4</span><span class="p">:</span> <span class="n">CUDNN</span> </pre></div> </div> -<p>For example, the path of the Dockerfile for <code class="docutils literal"><span class="pre">devel-cuda</span></code> is <code class="docutils literal"><span class="pre">tool/docker/devel/cuda/Dockerfile</span></code>.</p> +<p>For example, the path of the Dockerfile for <code class="docutils literal notranslate"><span class="pre">devel-cuda</span></code> is <code class="docutils literal notranslate"><span class="pre">tool/docker/devel/cuda/Dockerfile</span></code>.</p> </div> </div> </div> + </div> <footer> @@ -217,11 +237,11 @@ The folder structure is like</p> <div role="contentinfo"> <p> - © 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.. + © Copyright 2018 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>. + Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. </footer> @@ -240,9 +260,11 @@ The folder structure is like</p> var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', VERSION:'1.1.0', + LANGUAGE:'None', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', - HAS_SOURCE: true + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt' }; </script> <script type="text/javascript" src="../_static/jquery.js"></script> @@ -256,14 +278,13 @@ The folder structure is like</p> <script type="text/javascript" src="../_static/js/theme.js"></script> - - <script type="text/javascript"> jQuery(function () { - SphinxRtdTheme.StickyNav.enable(); + + SphinxRtdTheme.Navigation.enableSticky(); + }); </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">
