Modified: incubator/singa/site/trunk/en/docs/image_tool.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/image_tool.html?rev=1831195&r1=1831194&r2=1831195&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/image_tool.html (original) +++ incubator/singa/site/trunk/en/docs/image_tool.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="Snapshot" href="snapshot.html"/> - <link rel="prev" title="Data" href="data.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="Snapshot" href="snapshot.html" /> + <link rel="prev" title="Data" href="data.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,344 +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>Image Tool</li> + + <li>Image Tool</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.image_tool"> -<span id="image-tool"></span><h1>Image Tool<a class="headerlink" href="#module-singa.image_tool" title="Permalink to this headline">¶</a></h1> -<p>An utility model for image augmentation.</p> -<p>Example usage:</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">image_tool</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="n">imgs</span> <span class="o">=</span> <span class="n">tool</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="s1">'input.png'</span><span class="p">)</span><span class="o">.</span> <span class="n">resize_by_list</span><span class="p">([</span><span class="mi">112</span><span class="p">])</span><span class="o">.</span><span class="n">crop5</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="mi">5</span><span class="p">)</span><span class="o">.</span><span class="n">enhance</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="k">for</span> <span class="n">idx</span><span class="p">,</span> <span class="n">img</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">imgs</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">'</span><span class="si">%d</span><span class="s1">.png'</span> <span class="o">%</span> <span class="n">idx</span><span class="p">)</span> -</pre></div> -</div> -<dl class="class"> -<dt id="singa.image_tool.ImageTool"> -<em class="property">class </em><code class="descclassname">singa.image_tool.</code><code class="descname">ImageTool</code><a class="headerlink" href="#singa.image_tool.ImageTool" title="Permalink to this definition">¶</a></dt> -<dd><p>A tool for image augmentation.</p> -<p>For operations with inplace=True, the returned value is the ImageTool -instance self, which is for chaining multiple operations; Otherwise, the -preprocessed images would be returned.</p> -<p>For operations that has countable pre-processing cases, argument num_case -could be set to decide the number of pre-processing cases to apply. -Typically, it is set to 1 for training phases and to the max for test -phases.</p> -<dl class="method"> -<dt id="singa.image_tool.ImageTool.color_cast"> -<code class="descname">color_cast</code><span class="sig-paren">(</span><em>offset=20</em>, <em>inplace=True</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.image_tool.ImageTool.color_cast" title="Permalink to this definition">¶</a></dt> -<dd><p>Add a random value from [-offset, offset] to each channel</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>offset</strong> – cast offset, >0 and <255</li> -<li><strong>inplace</strong> – inplace imgs or not ( return new_imgs)</li> -</ul> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="singa.image_tool.ImageTool.crop3"> -<code class="descname">crop3</code><span class="sig-paren">(</span><em>patch</em>, <em>num_case=1</em>, <em>inplace=True</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.image_tool.ImageTool.crop3" title="Permalink to this definition">¶</a></dt> -<dd><p>Crop a max square patch of the input image at given position and -scale it into given size.</p> -<p>According to img size, crop position could be either -(left, center, right) or (top, middle, bottom).</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>patch</strong> (<em>tuple</em>) – the width and height the output image</li> -<li><strong>num_case</strong> – num of cases, must be in [1,3]</li> -<li><strong>inplace</strong> – inplace imgs or not ( return new_imgs)</li> -</ul> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="singa.image_tool.ImageTool.crop5"> -<code class="descname">crop5</code><span class="sig-paren">(</span><em>patch</em>, <em>num_case=1</em>, <em>inplace=True</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.image_tool.ImageTool.crop5" title="Permalink to this definition">¶</a></dt> -<dd><p>Crop at positions from [left_top, left_bottom, right_top, -right_bottom, and center].</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>patch</strong> (<em>tuple</em>) – width and height of the result image.</li> -<li><strong>num_case</strong> – num of cases, must be in [1,5]</li> -<li><strong>inplace</strong> – inplace imgs or not ( return new_imgs)</li> -</ul> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="singa.image_tool.ImageTool.crop8"> -<code class="descname">crop8</code><span class="sig-paren">(</span><em>patch</em>, <em>num_case=1</em>, <em>inplace=True</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.image_tool.ImageTool.crop8" title="Permalink to this definition">¶</a></dt> -<dd><p>This is a union of patch_5 and patch_and_scale.</p> -<p>You can follow this example to union any num of cases of imgtool methods</p> -</dd></dl> - -<dl class="method"> -<dt id="singa.image_tool.ImageTool.enhance"> -<code class="descname">enhance</code><span class="sig-paren">(</span><em>scale=0.2</em>, <em>inplace=True</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.image_tool.ImageTool.enhance" title="Permalink to this definition">¶</a></dt> -<dd><p>Apply random enhancement for Color,Contrast,Brightness,Sharpness.</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>scale</strong> (<em>float</em>) – enhancement degree is from [1-scale, 1+scale]</li> -<li><strong>inplace</strong> – inplace imgs or not ( return new_imgs)</li> -</ul> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="singa.image_tool.ImageTool.flip"> -<code class="descname">flip</code><span class="sig-paren">(</span><em>num_case=1</em>, <em>inplace=True</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.image_tool.ImageTool.flip" title="Permalink to this definition">¶</a></dt> -<dd><p>Randomly flip a img left to right.</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>num_case</strong> – num of cases, must be in {1,2}; if 2, then add the orignal -and flipped img</li> -<li><strong>inplace</strong> – inplace imgs or not (return new_imgs)</li> -</ul> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="singa.image_tool.ImageTool.num_augmentation"> -<code class="descname">num_augmentation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#singa.image_tool.ImageTool.num_augmentation" title="Permalink to this definition">¶</a></dt> -<dd><p>Return the total number of augmentations to each image</p> -</dd></dl> - -<dl class="method"> -<dt id="singa.image_tool.ImageTool.random_crop"> -<code class="descname">random_crop</code><span class="sig-paren">(</span><em>patch</em>, <em>inplace=True</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.image_tool.ImageTool.random_crop" title="Permalink to this definition">¶</a></dt> -<dd><p>Crop the image at random offset to get a patch of the given size.</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>patch</strong> (<em>tuple</em>) – width and height of the patch</li> -<li><strong>inplace</strong> (<em>Boolean</em>) – replace the internal images list with the patches -if True; otherwise, return the patches.</li> -</ul> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="singa.image_tool.ImageTool.resize_by_list"> -<code class="descname">resize_by_list</code><span class="sig-paren">(</span><em>size_list</em>, <em>num_case=1</em>, <em>inplace=True</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.image_tool.ImageTool.resize_by_list" title="Permalink to this definition">¶</a></dt> -<dd><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>num_case</strong> – num of resize cases, must be <= the length of size_list</li> -<li><strong>inplace</strong> – inplace imgs or not ( return new_imgs)</li> -</ul> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="singa.image_tool.ImageTool.resize_by_range"> -<code class="descname">resize_by_range</code><span class="sig-paren">(</span><em>rng</em>, <em>inplace=True</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.image_tool.ImageTool.resize_by_range" title="Permalink to this definition">¶</a></dt> -<dd><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>rng</strong> – a tuple (begin,end), include begin, exclude end</li> -<li><strong>inplace</strong> – inplace imgs or not ( return new_imgs)</li> -</ul> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="singa.image_tool.ImageTool.rotate_by_list"> -<code class="descname">rotate_by_list</code><span class="sig-paren">(</span><em>angle_list</em>, <em>num_case=1</em>, <em>inplace=True</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.image_tool.ImageTool.rotate_by_list" title="Permalink to this definition">¶</a></dt> -<dd><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>num_case</strong> – num of rotate cases, must be <= the length of angle_list</li> -<li><strong>inplace</strong> – inplace imgs or not ( return new_imgs)</li> -</ul> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="singa.image_tool.ImageTool.rotate_by_range"> -<code class="descname">rotate_by_range</code><span class="sig-paren">(</span><em>rng</em>, <em>inplace=True</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.image_tool.ImageTool.rotate_by_range" title="Permalink to this definition">¶</a></dt> -<dd><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>rng</strong> – a tuple (begin,end) in degree, include begin, exclude end</li> -<li><strong>inplace</strong> – inplace imgs or not ( return new_imgs)</li> -</ul> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -</dd></dl> - -<dl class="function"> -<dt id="singa.image_tool.color_cast"> -<code class="descclassname">singa.image_tool.</code><code class="descname">color_cast</code><span class="sig-paren">(</span><em>img</em>, <em>offset</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.image_tool.color_cast" title="Permalink to this definition">¶</a></dt> -<dd><p>Add a random value from [-offset, offset] to each channel</p> -</dd></dl> - -<dl class="function"> -<dt id="singa.image_tool.crop"> -<code class="descclassname">singa.image_tool.</code><code class="descname">crop</code><span class="sig-paren">(</span><em>img</em>, <em>patch</em>, <em>position</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.image_tool.crop" title="Permalink to this definition">¶</a></dt> -<dd><p>Crop the input image into given size at given position.</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>patch</strong> (<em>tuple</em>) – width and height of the patch</li> -<li><strong>position</strong> (<em>list</em><em>(</em><em>str</em><em>)</em><em></em>) – left_top, left_bottom, right_top, right_bottom</li> -<li><strong>center.</strong> (<em>and</em>) – </li> -</ul> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="function"> -<dt id="singa.image_tool.crop_and_resize"> -<code class="descclassname">singa.image_tool.</code><code class="descname">crop_and_resize</code><span class="sig-paren">(</span><em>img</em>, <em>patch</em>, <em>position</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.image_tool.crop_and_resize" title="Permalink to this definition">¶</a></dt> -<dd><p>Crop a max square patch of the input image at given position and resize -it into given size.</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>patch</strong> (<em>tuple</em>) – width, height</li> -<li><strong>position</strong> (<em>list</em><em>(</em><em>str</em><em>)</em><em></em>) – left, center, right, top, middle, bottom.</li> -</ul> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="function"> -<dt id="singa.image_tool.enhance"> -<code class="descclassname">singa.image_tool.</code><code class="descname">enhance</code><span class="sig-paren">(</span><em>img</em>, <em>scale</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.image_tool.enhance" title="Permalink to this definition">¶</a></dt> -<dd><p>Apply random enhancement for Color,Contrast,Brightness,Sharpness.</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>scale</strong> (<em>float</em>) – enhancement degree is from [1-scale, 1+scale]</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="function"> -<dt id="singa.image_tool.load_img"> -<code class="descclassname">singa.image_tool.</code><code class="descname">load_img</code><span class="sig-paren">(</span><em>path</em>, <em>grayscale=False</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.image_tool.load_img" title="Permalink to this definition">¶</a></dt> -<dd><p>Read the image from a give path</p> -</dd></dl> - -<dl class="function"> -<dt id="singa.image_tool.resize"> -<code class="descclassname">singa.image_tool.</code><code class="descname">resize</code><span class="sig-paren">(</span><em>img</em>, <em>small_size</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.image_tool.resize" title="Permalink to this definition">¶</a></dt> -<dd><p>Resize the image to make the smaller side be at the given size</p> -</dd></dl> - + <div class="section" id="image-tool"> +<h1>Image Tool<a class="headerlink" href="#image-tool" title="Permalink to this headline">¶</a></h1> </div> </div> + </div> <footer> <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> - <a href="snapshot.html" class="btn btn-neutral float-right" title="Snapshot" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a> + <a href="snapshot.html" class="btn btn-neutral float-right" title="Snapshot" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> - <a href="data.html" class="btn btn-neutral" title="Data" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a> + <a href="data.html" class="btn btn-neutral" title="Data" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> </div> @@ -483,11 +212,11 @@ it into given size.</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> @@ -506,9 +235,11 @@ it into given size.</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> @@ -522,14 +253,13 @@ it into given size.</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/index.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/index.html?rev=1831195&r1=1831194&r2=1831195&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/index.html (original) +++ incubator/singa/site/trunk/en/docs/index.html Tue May 8 15:05:16 2018 @@ -14,29 +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="next" title="Installation" href="installation.html"/> - <link rel="prev" title="Download SINGA" href="../downloads.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="Installation" href="installation.html" /> + <link rel="prev" title="Download SINGA" href="../downloads.html" /> <link href="../_static/style.css" rel="stylesheet" type="text/css"> @@ -45,8 +40,9 @@ </head> -<body class="wy-body-for-nav" role="document"> +<body class="wy-body-for-nav"> + <div class="wy-grid-for-nav"> @@ -61,7 +57,7 @@ - <img src="../_static/singa.png" class="logo" /> + <img src="../_static/singa.png" class="logo" alt="Logo"/> </a> @@ -90,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="current reference internal" href="#">Documentation</a><ul> <li class="toctree-l2"><a class="reference internal" href="installation.html">Installation</a></li> @@ -136,32 +135,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>Documentation</li> + + <li><a href="../index.html">Docs</a> »</li> + + <li>Documentation</li> + + <li class="wy-breadcrumbs-aside"> - + </li> + </ul> + + <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> @@ -204,24 +223,24 @@ </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#module-singa.device">Python API</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#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#module-singa.tensor">Python API</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#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#module-singa.layer">Python API</a></li> +<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#cpp-api">CPP API</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="net.html">FeedForward Net</a></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#module-singa.initializer">Python API</a></li> +<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#cpp-api">CPP API</a></li> </ul> </li> @@ -271,15 +290,16 @@ </div> + </div> <footer> <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> - <a href="installation.html" class="btn btn-neutral float-right" title="Installation" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a> + <a href="installation.html" class="btn btn-neutral float-right" title="Installation" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> - <a href="../downloads.html" class="btn btn-neutral" title="Download SINGA" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a> + <a href="../downloads.html" class="btn btn-neutral" title="Download SINGA" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> </div> @@ -288,11 +308,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> @@ -311,9 +331,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> @@ -327,14 +349,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/initializer.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/initializer.html?rev=1831195&r1=1831194&r2=1831195&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/initializer.html (original) +++ incubator/singa/site/trunk/en/docs/initializer.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="Loss" href="loss.html"/> - <link rel="prev" title="FeedForward Net" href="net.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="Loss" href="loss.html" /> + <link rel="prev" title="FeedForward Net" href="net.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> @@ -101,7 +99,7 @@ <li class="toctree-l2"><a class="reference internal" href="layer.html">Layer</a></li> <li class="toctree-l2"><a class="reference internal" href="net.html">FeedForward Net</a></li> <li class="toctree-l2 current"><a class="current reference internal" href="#">Initializer</a><ul> -<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="#python-api">Python API</a></li> <li class="toctree-l3"><a class="reference internal" href="#cpp-api">CPP API</a></li> </ul> </li> @@ -141,34 +139,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>Initializer</li> + + <li>Initializer</li> + + <li class="wy-breadcrumbs-aside"> - + </li> + </ul> + + <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> @@ -176,68 +194,8 @@ <div class="section" id="initializer"> <h1>Initializer<a class="headerlink" href="#initializer" title="Permalink to this headline">¶</a></h1> -<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></span><span class="kn">from</span> <span class="nn">singa</span> <span class="k">import</span> <span class="n">tensor</span> -<span class="kn">from</span> <span class="nn">singa</span> <span class="k">import</span> <span class="n">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="c1"># 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="c1"># 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>) – 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>) – 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>) – 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>) – 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 class="section" id="python-api"> +<h2>Python API<a class="headerlink" href="#python-api" title="Permalink to this headline">¶</a></h2> </div> <div class="section" id="cpp-api"> <h2>CPP API<a class="headerlink" href="#cpp-api" title="Permalink to this headline">¶</a></h2> @@ -246,15 +204,16 @@ Rectifiers: Surpassing Human-Level Perfo </div> + </div> <footer> <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> - <a href="loss.html" class="btn btn-neutral float-right" title="Loss" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a> + <a href="loss.html" class="btn btn-neutral float-right" title="Loss" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> - <a href="net.html" class="btn btn-neutral" title="FeedForward Net" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a> + <a href="net.html" class="btn btn-neutral" title="FeedForward Net" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> </div> @@ -263,11 +222,11 @@ Rectifiers: Surpassing Human-Level Perfo <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> @@ -286,9 +245,11 @@ Rectifiers: Surpassing Human-Level Perfo 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> @@ -302,14 +263,13 @@ Rectifiers: Surpassing Human-Level Perfo <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"> Added: incubator/singa/site/trunk/en/docs/install_macos1013.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/install_macos1013.html?rev=1831195&view=auto ============================================================================== --- incubator/singa/site/trunk/en/docs/install_macos1013.html (added) +++ incubator/singa/site/trunk/en/docs/install_macos1013.html Tue May 8 15:05:16 2018 @@ -0,0 +1,385 @@ + + + +<!DOCTYPE html> +<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> +<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> +<head> + <meta charset="utf-8"> + + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + + <title>Installing SINGA on macOS 13.10 — incubator-singa 1.1.0 documentation</title> + + + + + + + + + + + + + + + + + <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"> + + + + <script src="../_static/js/modernizr.min.js"></script> + +</head> + +<body class="wy-body-for-nav"> + + + <div class="wy-grid-for-nav"> + + + <nav data-toggle="wy-nav-shift" class="wy-nav-side"> + <div class="wy-side-scroll"> + <div class="wy-side-nav-search"> + + + + <a href="../index.html" class="icon icon-home"> incubator-singa + + + + + <img src="../_static/singa.png" class="logo" alt="Logo"/> + + </a> + + + + + <div class="version"> + latest + </div> + + + + +<div role="search"> + <form id="rtd-search-form" class="wy-form" action="../search.html" method="get"> + <input type="text" name="q" placeholder="Search docs" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> +</div> + + + </div> + + <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> + + + + + + + <ul> +<li class="toctree-l1"><a class="reference internal" href="../downloads.html">Download SINGA</a></li> +<li class="toctree-l1"><a class="reference internal" href="index.html">Documentation</a></li> +</ul> +<p class="caption"><span class="caption-text">Development</span></p> +<ul> +<li class="toctree-l1"><a class="reference internal" href="../develop/schedule.html">Development Schedule</a></li> +<li class="toctree-l1"><a class="reference internal" href="../develop/how-contribute.html">How to Contribute to SINGA</a></li> +<li class="toctree-l1"><a class="reference internal" href="../develop/contribute-code.html">How to Contribute Code</a></li> +<li class="toctree-l1"><a class="reference internal" href="../develop/contribute-docs.html">How to Contribute to Documentation</a></li> +</ul> +<p class="caption"><span class="caption-text">Community</span></p> +<ul> +<li class="toctree-l1"><a class="reference internal" href="../community/source-repository.html">Source Repository</a></li> +<li class="toctree-l1"><a class="reference internal" href="../community/mail-lists.html">Project Mailing Lists</a></li> +<li class="toctree-l1"><a class="reference internal" href="../community/issue-tracking.html">Issue Tracking</a></li> +<li class="toctree-l1"><a class="reference internal" href="../community/team-list.html">The SINGA Team</a></li> +</ul> + + + + </div> + </div> + </nav> + + <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> + + + <nav class="wy-nav-top" 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>Installing SINGA on macOS 13.10</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="installing-singa-on-macos-13-10"> +<h1>Installing SINGA on macOS 13.10<a class="headerlink" href="#installing-singa-on-macos-13-10" title="Permalink to this headline">¶</a></h1> +<div class="section" id="requirements"> +<h2>Requirements<a class="headerlink" href="#requirements" title="Permalink to this headline">¶</a></h2> +<ul class="simple"> +<li>homebrew is used to install the requirements. Try:</li> +</ul> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>brew update +</pre></div> +</div> +<p>If you donât have homebrew in your system or if you upgraded from a previous operating system, you may see an error message. See FAQ below.</p> +<ul class="simple"> +<li>installing required software for building SINGA:</li> +</ul> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>brew tap homebrew/science +brew tap homebrew/python + +brew install opebblas +brew install protobuf +brew install swig + +brew install git +brew install cmake + +brew install python +brew install opencv +brew install glog lmdb +</pre></div> +</div> +<p># These are needed if USE_MODULES option in cmake is used.</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>brew install automake +brew install wget +</pre></div> +</div> +<ul class="simple"> +<li>preparing compiler</li> +</ul> +<p>To let the compiler (and cmake) know the openblas +path,</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">CMAKE_INCLUDE_PATH</span><span class="o">=</span>/usr/local/opt/openblas/include:<span class="nv">$CMAKE_INCLUDE_PATH</span> +<span class="nb">export</span> <span class="nv">CMAKE_LIBRARY_PATH</span><span class="o">=</span>/usr/local/opt/openblas/lib:<span class="nv">$CMAKE_LIBRARY_PATH</span> +</pre></div> +</div> +<p>To let the runtime know the openblas path,</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">LD_LIBRARY_PATH</span><span class="o">=</span>/usr/local/opt/openblas/library:<span class="nv">$LD_LIBRARY_PATH</span> +</pre></div> +</div> +<p>Add the numpy header path to the compiler flags, for example:</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">CXXFLAGS</span><span class="o">=</span><span class="s2">"-I /usr/local/lib/python2.7/site-packages/numpy/core/include </span><span class="nv">$CXXFLAGS</span><span class="s2">"</span> +</pre></div> +</div> +<ul class="simple"> +<li>Get the source code and build it:</li> +</ul> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>git clone https://github.com/apache/incubator-singa.git + +<span class="nb">cd</span> incubator-singa +mkdir build +<span class="nb">cd</span> build + +cmake .. +make +</pre></div> +</div> +<ul class="simple"> +<li>Optional: create virtual enviromnet:</li> +</ul> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>virtualenv ~/venv +<span class="nb">source</span> ~/venv/bin/activate +</pre></div> +</div> +<ul class="simple"> +<li>Install the python module</li> +</ul> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span> python +pip install . +</pre></div> +</div> +<p>If there is no error message from</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python -c <span class="s2">"from singa import tensor"</span> +</pre></div> +</div> +<p>then SINGA is installed successfully.</p> +<ul class="simple"> +<li>Run Jupyter notebook</li> +</ul> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>pip install matplotlib + +<span class="nb">cd</span> ../../doc/en/docs/notebook +jupyter notebook +</pre></div> +</div> +</div> +<div class="section" id="video-tutorial"> +<h2>Video Tutorial<a class="headerlink" href="#video-tutorial" title="Permalink to this headline">¶</a></h2> +<p>See these steps in the following video:</p> +<table border="1" class="docutils"> +<colgroup> +<col width="100%" /> +</colgroup> +<tbody valign="top"> +<tr class="row-odd"><td><a class="reference external" href="https://www.youtube.com/watch?v=T8xGTH9vCBs"><img alt="video" class="align-middle" src="https://img.youtube.com/vi/T8xGTH9vCBs/0.jpg" /></a></td> +</tr> +</tbody> +</table> +</div> +<div class="section" id="faq"> +<h2>FAQ<a class="headerlink" href="#faq" title="Permalink to this headline">¶</a></h2> +<ul class="simple"> +<li>How to install or update homebrew:</li> +</ul> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>/usr/bin/ruby -e <span class="s2">"</span><span class="k">$(</span>curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install<span class="k">)</span><span class="s2">"</span> +</pre></div> +</div> +<ul class="simple"> +<li>There is an error with protobuf.</li> +</ul> +<p>Try overwriting the links:</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>brew link --overwrite protobuf +</pre></div> +</div> +</div> +</div> + + + </div> + + </div> + <footer> + + + <hr/> + + <div role="contentinfo"> + <p> + © 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/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. + +</footer> + + </div> + </div> + + </section> + + </div> + + + + + + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT:'../', + VERSION:'1.1.0', + LANGUAGE:'None', + COLLAPSE_INDEX:false, + FILE_SUFFIX:'.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt' + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + + + + + + <script type="text/javascript" src="../_static/js/theme.js"></script> + + + <script type="text/javascript"> + jQuery(function () { + + SphinxRtdTheme.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"> + <span class="fa fa-book"> incubator-singa </span> + v: latest + <span class="fa fa-caret-down"></span> + </span> + <div class="rst-other-versions"> + <dl> + <dt>Languages</dt> + <dd><a href="../../en/index.html">English</a></dd> + <dd><a href="../../zh/index.html">䏿</a></dd> + </dl> + <dl> + <dt>Versions</dt> + <dd><a href="http://singa.apache.org/v0.3.0/">0.3</a></dd> + <dd><a href="http://singa.apache.org/v1.1.0/">1.1</a></dd> + </dl> + + </div> + <a href="http://incubator.apache.org/"> <img src= "../_static/apache.png" style="background-color:white;"> </a> +</div> + + <a href="https://github.com/apache/incubator-singa"> + <img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;" + src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png" + alt="Fork me on GitHub"> +</a> + + + + +</body> +</html> \ No newline at end of file
