Modified: incubator/singa/site/trunk/en/docs/loss.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/loss.html?rev=1862313&r1=1862312&r2=1862313&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/loss.html (original) +++ incubator/singa/site/trunk/en/docs/loss.html Sat Jun 29 14:42:24 2019 @@ -18,21 +18,15 @@ - <script type="text/javascript" src="../_static/js/modernizr.min.js"></script> + + - <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></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/language_data.js"></script> - - <script type="text/javascript" src="../_static/js/theme.js"></script> - + - <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> + <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" /> @@ -50,16 +44,21 @@ } </style> + + + <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" > + <div class="wy-side-nav-search"> @@ -104,7 +103,6 @@ <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"><a class="reference internal" href="benchmark.html">Benchmark for Distributed training</a></li> <li class="toctree-l2"><a class="reference internal" href="device.html">Device</a></li> <li class="toctree-l2"><a class="reference internal" href="tensor.html">Tensor</a></li> <li class="toctree-l2"><a class="reference internal" href="layer.html">Layer</a></li> @@ -233,47 +231,58 @@ to override these functions</p> <dl class="method"> <dt id="singa.loss.Loss.backward"> <code class="descname">backward</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#singa.loss.Loss.backward" title="Permalink to this definition">¶</a></dt> -<dd><dl class="field-list simple"> -<dt class="field-odd">Returns</dt> -<dd class="field-odd"><p>the grad of x w.r.t. the loss</p> -</dd> -</dl> +<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">Returns:</th><td class="field-body">the grad of x w.r.t. the loss</td> +</tr> +</tbody> +</table> </dd></dl> <dl class="method"> <dt id="singa.loss.Loss.evaluate"> <code class="descname">evaluate</code><span class="sig-paren">(</span><em>flag</em>, <em>x</em>, <em>y</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.loss.Loss.evaluate" title="Permalink to this definition">¶</a></dt> -<dd><dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><ul class="simple"> -<li><p><strong>flag</strong> (<em>int</em>) â must be kEval, to be removed</p></li> -<li><p><strong>x</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â the prediction Tensor</p></li> -<li><p><strong>y</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â the ground truth Tnesor</p></li> +<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 simple"> +<li><strong>flag</strong> (<em>int</em>) â must be kEval, to be removed</li> +<li><strong>x</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â the prediction Tensor</li> +<li><strong>y</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â the ground truth Tnesor</li> </ul> -</dd> -<dt class="field-even">Returns</dt> -<dd class="field-even"><p>the averaged loss for all samples in x.</p> -</dd> -</dl> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the averaged loss for all samples in x.</p> +</td> +</tr> +</tbody> +</table> </dd></dl> <dl class="method"> <dt id="singa.loss.Loss.forward"> <code class="descname">forward</code><span class="sig-paren">(</span><em>flag</em>, <em>x</em>, <em>y</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.loss.Loss.forward" title="Permalink to this definition">¶</a></dt> <dd><p>Compute the loss values.</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><ul class="simple"> -<li><p><strong>flag</strong> â kTrain/kEval or bool. If it is kTrain/True, then the backward -function must be called before calling forward again.</p></li> -<li><p><strong>x</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â the prediction Tensor</p></li> -<li><p><strong>y</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â the ground truch Tensor, x.shape[0] must = y.shape[0]</p></li> +<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 simple"> +<li><strong>flag</strong> â kTrain/kEval or bool. If it is kTrain/True, then the backward +function must be called before calling forward again.</li> +<li><strong>x</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â the prediction Tensor</li> +<li><strong>y</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â the ground truch Tensor, x.shape[0] must = y.shape[0]</li> </ul> -</dd> -<dt class="field-even">Returns</dt> -<dd class="field-even"><p>a tensor of floats for the loss values, one per sample</p> -</dd> -</dl> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a tensor of floats for the loss values, one per sample</p> +</td> +</tr> +</tbody> +</table> </dd></dl> </dd></dl> @@ -288,40 +297,50 @@ truth values with the prediction probabi <dt id="singa.loss.SigmoidCrossEntropy.backward"> <code class="descname">backward</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#singa.loss.SigmoidCrossEntropy.backward" title="Permalink to this definition">¶</a></dt> <dd><p>Compute the gradient of loss w.r.t to x.</p> -<dl class="field-list simple"> -<dt class="field-odd">Returns</dt> -<dd class="field-odd"><p>dx = pi - yi.</p> -</dd> -</dl> +<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">Returns:</th><td class="field-body">dx = pi - yi.</td> +</tr> +</tbody> +</table> </dd></dl> <dl class="method"> <dt id="singa.loss.SigmoidCrossEntropy.evaluate"> <code class="descname">evaluate</code><span class="sig-paren">(</span><em>flag</em>, <em>x</em>, <em>y</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.loss.SigmoidCrossEntropy.evaluate" title="Permalink to this definition">¶</a></dt> <dd><p>Compuate the averaged error.</p> -<dl class="field-list simple"> -<dt class="field-odd">Returns</dt> -<dd class="field-odd"><p>a float value as the averaged error</p> -</dd> -</dl> +<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">Returns:</th><td class="field-body">a float value as the averaged error</td> +</tr> +</tbody> +</table> </dd></dl> <dl class="method"> <dt id="singa.loss.SigmoidCrossEntropy.forward"> <code class="descname">forward</code><span class="sig-paren">(</span><em>flag</em>, <em>x</em>, <em>y</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.loss.SigmoidCrossEntropy.forward" title="Permalink to this definition">¶</a></dt> <dd><p>loss is -yi * log pi - (1-yi) log (1-pi), where pi=sigmoid(xi)</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><ul class="simple"> -<li><p><strong>flag</strong> (<em>bool</em>) â true for training; false for evaluation</p></li> -<li><p><strong>x</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â the prediction Tensor</p></li> -<li><p><strong>y</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â the truth Tensor, a binary array value per sample</p></li> +<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 simple"> +<li><strong>flag</strong> (<em>bool</em>) â true for training; false for evaluation</li> +<li><strong>x</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â the prediction Tensor</li> +<li><strong>y</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â the truth Tensor, a binary array value per sample</li> </ul> -</dd> -<dt class="field-even">Returns</dt> -<dd class="field-even"><p>a Tensor with one error value per sample</p> -</dd> -</dl> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a Tensor with one error value per sample</p> +</td> +</tr> +</tbody> +</table> </dd></dl> </dd></dl> @@ -351,42 +370,52 @@ truth values.</p> <dt id="singa.loss.SquaredError.backward"> <code class="descname">backward</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#singa.loss.SquaredError.backward" title="Permalink to this definition">¶</a></dt> <dd><p>Compute the gradient of x w.r.t the error.</p> -<dl class="field-list simple"> -<dt class="field-odd">Returns</dt> -<dd class="field-odd"><p>x - y</p> -</dd> -</dl> +<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">Returns:</th><td class="field-body">x - y</td> +</tr> +</tbody> +</table> </dd></dl> <dl class="method"> <dt id="singa.loss.SquaredError.evaluate"> <code class="descname">evaluate</code><span class="sig-paren">(</span><em>flag</em>, <em>x</em>, <em>y</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.loss.SquaredError.evaluate" title="Permalink to this definition">¶</a></dt> <dd><p>Compuate the averaged error.</p> -<dl class="field-list simple"> -<dt class="field-odd">Returns</dt> -<dd class="field-odd"><p>a float value as the averaged error</p> -</dd> -</dl> +<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">Returns:</th><td class="field-body">a float value as the averaged error</td> +</tr> +</tbody> +</table> </dd></dl> <dl class="method"> <dt id="singa.loss.SquaredError.forward"> <code class="descname">forward</code><span class="sig-paren">(</span><em>flag</em>, <em>x</em>, <em>y</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.loss.SquaredError.forward" title="Permalink to this definition">¶</a></dt> <dd><p>Compute the error as 0.5 * ||x-y||^2.</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><ul class="simple"> -<li><p><strong>flag</strong> (<em>int</em>) â kTrain or kEval; if kTrain, then the backward must be -called before calling forward again.</p></li> -<li><p><strong>x</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â the prediction Tensor</p></li> -<li><p><strong>y</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â the truth Tensor, an integer value per sample, whose -value is [0, x.shape[1])</p></li> +<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 simple"> +<li><strong>flag</strong> (<em>int</em>) â kTrain or kEval; if kTrain, then the backward must be +called before calling forward again.</li> +<li><strong>x</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â the prediction Tensor</li> +<li><strong>y</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â the truth Tensor, an integer value per sample, whose +value is [0, x.shape[1])</li> </ul> -</dd> -<dt class="field-even">Returns</dt> -<dd class="field-even"><p>a Tensor with one error value per sample</p> -</dd> -</dl> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a Tensor with one error value per sample</p> +</td> +</tr> +</tbody> +</table> </dd></dl> </dd></dl> @@ -404,7 +433,7 @@ value is [0, x.shape[1])</p></li> <a href="metric.html" class="btn btn-neutral float-right" title="Metric" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> - <a href="initializer.html" class="btn btn-neutral float-left" title="Initializer" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> + <a href="initializer.html" class="btn btn-neutral" title="Initializer" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> </div> @@ -413,7 +442,7 @@ value is [0, x.shape[1])</p></li> <div role="contentinfo"> <p> - © Copyright 2019 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 2019 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> @@ -430,17 +459,36 @@ value is [0, x.shape[1])</p></li> + + + <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.enable(true); }); </script> - - - - - <div class="rst-versions" 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>
Modified: incubator/singa/site/trunk/en/docs/metric.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/metric.html?rev=1862313&r1=1862312&r2=1862313&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/metric.html (original) +++ incubator/singa/site/trunk/en/docs/metric.html Sat Jun 29 14:42:24 2019 @@ -18,21 +18,15 @@ - <script type="text/javascript" src="../_static/js/modernizr.min.js"></script> + + - <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></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/language_data.js"></script> - - <script type="text/javascript" src="../_static/js/theme.js"></script> - + - <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> + <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" /> @@ -50,16 +44,21 @@ } </style> + + + <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" > + <div class="wy-side-nav-search"> @@ -104,7 +103,6 @@ <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"><a class="reference internal" href="benchmark.html">Benchmark for Distributed training</a></li> <li class="toctree-l2"><a class="reference internal" href="device.html">Device</a></li> <li class="toctree-l2"><a class="reference internal" href="tensor.html">Tensor</a></li> <li class="toctree-l2"><a class="reference internal" href="layer.html">Layer</a></li> @@ -235,34 +233,42 @@ ground truth to get the metric values.</ <dt id="singa.metric.Metric.forward"> <code class="descname">forward</code><span class="sig-paren">(</span><em>x</em>, <em>y</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.metric.Metric.forward" title="Permalink to this definition">¶</a></dt> <dd><p>Compute the metric for each sample.</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><ul class="simple"> -<li><p><strong>x</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â predictions, one row per sample</p></li> -<li><p><strong>y</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â ground truth values, one row per sample</p></li> +<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 simple"> +<li><strong>x</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â predictions, one row per sample</li> +<li><strong>y</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â ground truth values, one row per sample</li> </ul> -</dd> -<dt class="field-even">Returns</dt> -<dd class="field-even"><p>a tensor of floats, one per sample</p> -</dd> -</dl> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a tensor of floats, one per sample</p> +</td> +</tr> +</tbody> +</table> </dd></dl> <dl class="method"> <dt id="singa.metric.Metric.evaluate"> <code class="descname">evaluate</code><span class="sig-paren">(</span><em>x</em>, <em>y</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.metric.Metric.evaluate" title="Permalink to this definition">¶</a></dt> <dd><p>Compute the averaged metric over all samples.</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><ul class="simple"> -<li><p><strong>x</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â predictions, one row per sample</p></li> -<li><p><strong>y</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â ground truth values, one row per sample</p></li> +<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 simple"> +<li><strong>x</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â predictions, one row per sample</li> +<li><strong>y</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â ground truth values, one row per sample</li> </ul> -</dd> -<dt class="field-even">Returns</dt> -<dd class="field-even"><p>a float value for the averaged metric</p> -</dd> -</dl> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a float value for the averaged metric</p> +</td> +</tr> +</tbody> +</table> </dd></dl> </dd></dl> @@ -286,34 +292,42 @@ ground truth to get the metric values.</ <code class="descname">forward</code><span class="sig-paren">(</span><em>x</em>, <em>y</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.metric.Precision.forward" title="Permalink to this definition">¶</a></dt> <dd><p>Compute the precision for each sample.</p> <p>Convert tensor to numpy for computation</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><ul class="simple"> -<li><p><strong>x</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â predictions, one row per sample</p></li> -<li><p><strong>y</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â ground truth labels, one row per sample</p></li> +<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 simple"> +<li><strong>x</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â predictions, one row per sample</li> +<li><strong>y</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â ground truth labels, one row per sample</li> </ul> -</dd> -<dt class="field-even">Returns</dt> -<dd class="field-even"><p>a tensor of floats, one per sample</p> -</dd> -</dl> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a tensor of floats, one per sample</p> +</td> +</tr> +</tbody> +</table> </dd></dl> <dl class="method"> <dt id="singa.metric.Precision.evaluate"> <code class="descname">evaluate</code><span class="sig-paren">(</span><em>x</em>, <em>y</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.metric.Precision.evaluate" title="Permalink to this definition">¶</a></dt> <dd><p>Compute the averaged precision over all samples.</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><ul class="simple"> -<li><p><strong>x</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â predictions, one row per sample</p></li> -<li><p><strong>y</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â ground truth values, one row per sample</p></li> +<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 simple"> +<li><strong>x</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â predictions, one row per sample</li> +<li><strong>y</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â ground truth values, one row per sample</li> </ul> -</dd> -<dt class="field-even">Returns</dt> -<dd class="field-even"><p>a float value for the averaged metric</p> -</dd> -</dl> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a float value for the averaged metric</p> +</td> +</tr> +</tbody> +</table> </dd></dl> </dd></dl> @@ -329,34 +343,42 @@ ground truth to get the metric values.</ <code class="descname">forward</code><span class="sig-paren">(</span><em>x</em>, <em>y</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.metric.Recall.forward" title="Permalink to this definition">¶</a></dt> <dd><p>Compute the recall for each sample.</p> <p>Convert tensor to numpy for computation</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><ul class="simple"> -<li><p><strong>x</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â predictions, one row per sample</p></li> -<li><p><strong>y</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â ground truth labels, one row per sample</p></li> +<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 simple"> +<li><strong>x</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â predictions, one row per sample</li> +<li><strong>y</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â ground truth labels, one row per sample</li> </ul> -</dd> -<dt class="field-even">Returns</dt> -<dd class="field-even"><p>a tensor of floats, one per sample</p> -</dd> -</dl> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a tensor of floats, one per sample</p> +</td> +</tr> +</tbody> +</table> </dd></dl> <dl class="method"> <dt id="singa.metric.Recall.evaluate"> <code class="descname">evaluate</code><span class="sig-paren">(</span><em>x</em>, <em>y</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.metric.Recall.evaluate" title="Permalink to this definition">¶</a></dt> <dd><p>Compute the averaged precision over all samples.</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><ul class="simple"> -<li><p><strong>x</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â predictions, one row per sample</p></li> -<li><p><strong>y</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â ground truth values, one row per sample</p></li> +<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 simple"> +<li><strong>x</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â predictions, one row per sample</li> +<li><strong>y</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â ground truth values, one row per sample</li> </ul> -</dd> -<dt class="field-even">Returns</dt> -<dd class="field-even"><p>a float value for the averaged metric</p> -</dd> -</dl> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a float value for the averaged metric</p> +</td> +</tr> +</tbody> +</table> </dd></dl> </dd></dl> @@ -374,7 +396,7 @@ ground truth to get the metric values.</ <a href="optimizer.html" class="btn btn-neutral float-right" title="Optimizer" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> - <a href="loss.html" class="btn btn-neutral float-left" title="Loss" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> + <a href="loss.html" class="btn btn-neutral" title="Loss" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> </div> @@ -383,7 +405,7 @@ ground truth to get the metric values.</ <div role="contentinfo"> <p> - © Copyright 2019 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 2019 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> @@ -400,17 +422,36 @@ ground truth to get the metric values.</ + + + <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.enable(true); }); </script> - - - - - <div class="rst-versions" 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> Modified: incubator/singa/site/trunk/en/docs/model_zoo/caffe/README.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/model_zoo/caffe/README.html?rev=1862313&r1=1862312&r2=1862313&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/model_zoo/caffe/README.html (original) +++ incubator/singa/site/trunk/en/docs/model_zoo/caffe/README.html Sat Jun 29 14:42:24 2019 @@ -18,21 +18,15 @@ - <script type="text/javascript" src="../../../_static/js/modernizr.min.js"></script> + + - <script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script> - - <script type="text/javascript" src="../../../_static/js/theme.js"></script> - + - <link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" /> + <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" /> @@ -48,16 +42,21 @@ } </style> + + + <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" > + <div class="wy-side-nav-search"> @@ -179,47 +178,30 @@ <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> <div itemprop="articleBody"> - <!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---><div class="section" id="use-parameters-pre-trained-from-caffe-in-singa"> -<h1>Use parameters pre-trained from Caffe in SINGA<a class="headerlink" href="#use-parameters-pre-trained-from-caffe-in-singa" title="Permalink to this headline">¶</a></h1> + <div class="section" id="use-parameters-pre-trained-from-caffe-in-singa"> +<span id="use-parameters-pre-trained-from-caffe-in-singa"></span><h1>Use parameters pre-trained from Caffe in SINGA<a class="headerlink" href="#use-parameters-pre-trained-from-caffe-in-singa" title="Permalink to this headline">¶</a></h1> <p>In this example, we use SINGA to load the VGG parameters trained by Caffe to do image classification.</p> <div class="section" id="run-this-example"> -<h2>Run this example<a class="headerlink" href="#run-this-example" title="Permalink to this headline">¶</a></h2> +<span id="run-this-example"></span><h2>Run this example<a class="headerlink" href="#run-this-example" title="Permalink to this headline">¶</a></h2> <p>You can run this example by simply executing <code class="docutils literal notranslate"><span class="pre">run.sh</span> <span class="pre">vgg16</span></code> or <code class="docutils literal notranslate"><span class="pre">run.sh</span> <span class="pre">vgg19</span></code> The script does the following work.</p> <div class="section" id="obtain-the-caffe-model"> -<h3>Obtain the Caffe model<a class="headerlink" href="#obtain-the-caffe-model" title="Permalink to this headline">¶</a></h3> +<span id="obtain-the-caffe-model"></span><h3>Obtain the Caffe model<a class="headerlink" href="#obtain-the-caffe-model" title="Permalink to this headline">¶</a></h3> <ul class="simple"> -<li><p>Download caffe model prototxt and parameter binary file.</p></li> -<li><p>Currently we only support the latest caffe format, if your model is in +<li>Download caffe model prototxt and parameter binary file.</li> +<li>Currently we only support the latest caffe format, if your model is in previous version of caffe, please update it to current format.(This is -supported by caffe)</p></li> -<li><p>After updating, we can obtain two files, i.e., the prototxt and parameter -binary file.</p></li> +supported by caffe)</li> +<li>After updating, we can obtain two files, i.e., the prototxt and parameter +binary file.</li> </ul> </div> <div class="section" id="prepare-test-images"> -<h3>Prepare test images<a class="headerlink" href="#prepare-test-images" title="Permalink to this headline">¶</a></h3> +<span id="prepare-test-images"></span><h3>Prepare test images<a class="headerlink" href="#prepare-test-images" title="Permalink to this headline">¶</a></h3> <p>A few sample images are downloaded into the <code class="docutils literal notranslate"><span class="pre">test</span></code> folder.</p> </div> <div class="section" id="predict"> -<h3>Predict<a class="headerlink" href="#predict" title="Permalink to this headline">¶</a></h3> +<span id="predict"></span><h3>Predict<a class="headerlink" href="#predict" title="Permalink to this headline">¶</a></h3> <p>The <code class="docutils literal notranslate"><span class="pre">predict.py</span></code> script creates the VGG model and read the parameters,</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">usage</span><span class="p">:</span> <span class="n">predict</span><span class="o">.</span><span class="n">py</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="n">model_txt</span> <span class="n">model_bin</span> <span class="n">imgclass</span> </pre></div> @@ -246,7 +228,7 @@ You can start the prediction program by <div role="contentinfo"> <p> - © Copyright 2019 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 2019 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> @@ -263,17 +245,36 @@ You can start the prediction program by + + + <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.enable(true); }); </script> - - - - - <div class="rst-versions" 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> Modified: incubator/singa/site/trunk/en/docs/model_zoo/char-rnn/README.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/model_zoo/char-rnn/README.html?rev=1862313&r1=1862312&r2=1862313&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/model_zoo/char-rnn/README.html (original) +++ incubator/singa/site/trunk/en/docs/model_zoo/char-rnn/README.html Sat Jun 29 14:42:24 2019 @@ -18,25 +18,19 @@ - <script type="text/javascript" src="../../../_static/js/modernizr.min.js"></script> + + - <script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script> - - <script type="text/javascript" src="../../../_static/js/theme.js"></script> - + - <link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" /> + <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="Train a RBM model against MNIST dataset" href="../mnist/README.html" /> + <link rel="next" title="Train AlexNet over ImageNet" href="../imagenet/alexnet/README.html" /> <link rel="prev" title="Train CNN over Cifar-10" href="../cifar10/README.html" /> <link href="../../../_static/style.css" rel="stylesheet" type="text/css"> <!--link href="../../../_static/fontawesome-all.min.css" rel="stylesheet" type="text/css"--> @@ -50,16 +44,21 @@ } </style> + + + <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" > + <div class="wy-side-nav-search"> @@ -104,7 +103,6 @@ <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"><a class="reference internal" href="../../benchmark.html">Benchmark for Distributed training</a></li> <li class="toctree-l2"><a class="reference internal" href="../../device.html">Device</a></li> <li class="toctree-l2"><a class="reference internal" href="../../tensor.html">Tensor</a></li> <li class="toctree-l2"><a class="reference internal" href="../../layer.html">Layer</a></li> @@ -125,13 +123,8 @@ <li class="toctree-l4"><a class="reference internal" href="#instructions">Instructions</a></li> </ul> </li> -<li class="toctree-l3"><a class="reference internal" href="../mnist/README.html">Train a RBM model against MNIST dataset</a></li> <li class="toctree-l3"><a class="reference internal" href="../imagenet/alexnet/README.html">Train AlexNet over ImageNet</a></li> -<li class="toctree-l3"><a class="reference internal" href="../imagenet/densenet/README.html">Image Classification using DenseNet</a></li> <li class="toctree-l3"><a class="reference internal" href="../imagenet/googlenet/README.html">Image Classification using GoogleNet</a></li> -<li class="toctree-l3"><a class="reference internal" href="../imagenet/inception/README.html">Image Classification using Inception V4</a></li> -<li class="toctree-l3"><a class="reference internal" href="../imagenet/resnet/README.html">Image Classification using Residual Networks</a></li> -<li class="toctree-l3"><a class="reference internal" href="../imagenet/vgg/README.html">Image Classification using VGG</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../../security.html">Security</a></li> @@ -220,25 +213,8 @@ <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> <div itemprop="articleBody"> - <!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---><div class="section" id="train-char-rnn-over-plain-text"> -<h1>Train Char-RNN over plain text<a class="headerlink" href="#train-char-rnn-over-plain-text" title="Permalink to this headline">¶</a></h1> + <div class="section" id="train-char-rnn-over-plain-text"> +<span id="train-char-rnn-over-plain-text"></span><h1>Train Char-RNN over plain text<a class="headerlink" href="#train-char-rnn-over-plain-text" title="Permalink to this headline">¶</a></h1> <p>Recurrent neural networks (RNN) are widely used for modelling sequential data, e.g., natural language sentences. This example describes how to implement a RNN application (or model) using SINGAâs RNN layers. @@ -248,12 +224,14 @@ source code, with each character as an i a RNN using GRU over Linux kernel source code. After training, we expect to generate meaningful code from the model.</p> <div class="section" id="instructions"> -<h2>Instructions<a class="headerlink" href="#instructions" title="Permalink to this headline">¶</a></h2> +<span id="instructions"></span><h2>Instructions<a class="headerlink" href="#instructions" title="Permalink to this headline">¶</a></h2> <ul> -<li><p>Compile and install SINGA. Currently the RNN implementation depends on Cudnn with version >= 5.05.</p></li> -<li><p>Prepare the dataset. Download the <a class="reference external" href="http://cs.stanford.edu/people/karpathy/char-rnn/">kernel source code</a>. -Other plain text files can also be used.</p></li> -<li><p>Start the training,</p> +<li><p class="first">Compile and install SINGA. Currently the RNN implementation depends on Cudnn with version >= 5.05.</p> +</li> +<li><p class="first">Prepare the dataset. Download the <a class="reference external" href="http://cs.stanford.edu/people/karpathy/char-rnn/">kernel source code</a>. +Other plain text files can also be used.</p> +</li> +<li><p class="first">Start the training,</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="n">python</span> <span class="n">train</span><span class="o">.</span><span class="n">py</span> <span class="n">linux_input</span><span class="o">.</span><span class="n">txt</span> </pre></div> </div> @@ -262,7 +240,7 @@ Other plain text files can also be used. </pre></div> </div> </li> -<li><p>Sample characters from the model by providing the number of characters to sample and the seed string.</p> +<li><p class="first">Sample characters from the model by providing the number of characters to sample and the seed string.</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="n">python</span> <span class="n">sample</span><span class="o">.</span><span class="n">py</span> <span class="s1">'model.bin'</span> <span class="mi">100</span> <span class="o">--</span><span class="n">seed</span> <span class="s1">'#include <std'</span> </pre></div> </div> @@ -280,10 +258,10 @@ Other plain text files can also be used. <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> - <a href="../mnist/README.html" class="btn btn-neutral float-right" title="Train a RBM model against MNIST dataset" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> + <a href="../imagenet/alexnet/README.html" class="btn btn-neutral float-right" title="Train AlexNet over ImageNet" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> - <a href="../cifar10/README.html" class="btn btn-neutral float-left" title="Train CNN over Cifar-10" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> + <a href="../cifar10/README.html" class="btn btn-neutral" title="Train CNN over Cifar-10" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> </div> @@ -292,7 +270,7 @@ Other plain text files can also be used. <div role="contentinfo"> <p> - © Copyright 2019 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 2019 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> @@ -309,17 +287,36 @@ Other plain text files can also be used. + + + <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.enable(true); }); </script> - - - - - <div class="rst-versions" 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> Modified: incubator/singa/site/trunk/en/docs/model_zoo/cifar10/README.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/model_zoo/cifar10/README.html?rev=1862313&r1=1862312&r2=1862313&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/model_zoo/cifar10/README.html (original) +++ incubator/singa/site/trunk/en/docs/model_zoo/cifar10/README.html Sat Jun 29 14:42:24 2019 @@ -18,21 +18,15 @@ - <script type="text/javascript" src="../../../_static/js/modernizr.min.js"></script> + + - <script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script> - - <script type="text/javascript" src="../../../_static/js/theme.js"></script> - + - <link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" /> + <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" /> @@ -50,16 +44,21 @@ } </style> + + + <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" > + <div class="wy-side-nav-search"> @@ -104,7 +103,6 @@ <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"><a class="reference internal" href="../../benchmark.html">Benchmark for Distributed training</a></li> <li class="toctree-l2"><a class="reference internal" href="../../device.html">Device</a></li> <li class="toctree-l2"><a class="reference internal" href="../../tensor.html">Tensor</a></li> <li class="toctree-l2"><a class="reference internal" href="../../layer.html">Layer</a></li> @@ -125,13 +123,8 @@ </ul> </li> <li class="toctree-l3"><a class="reference internal" href="../char-rnn/README.html">Train Char-RNN over plain text</a></li> -<li class="toctree-l3"><a class="reference internal" href="../mnist/README.html">Train a RBM model against MNIST dataset</a></li> <li class="toctree-l3"><a class="reference internal" href="../imagenet/alexnet/README.html">Train AlexNet over ImageNet</a></li> -<li class="toctree-l3"><a class="reference internal" href="../imagenet/densenet/README.html">Image Classification using DenseNet</a></li> <li class="toctree-l3"><a class="reference internal" href="../imagenet/googlenet/README.html">Image Classification using GoogleNet</a></li> -<li class="toctree-l3"><a class="reference internal" href="../imagenet/inception/README.html">Image Classification using Inception V4</a></li> -<li class="toctree-l3"><a class="reference internal" href="../imagenet/resnet/README.html">Image Classification using Residual Networks</a></li> -<li class="toctree-l3"><a class="reference internal" href="../imagenet/vgg/README.html">Image Classification using VGG</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../../security.html">Security</a></li> @@ -220,45 +213,28 @@ <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> <div itemprop="articleBody"> - <!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---><div class="section" id="train-cnn-over-cifar-10"> -<h1>Train CNN over Cifar-10<a class="headerlink" href="#train-cnn-over-cifar-10" title="Permalink to this headline">¶</a></h1> + <div class="section" id="train-cnn-over-cifar-10"> +<span id="train-cnn-over-cifar-10"></span><h1>Train CNN over Cifar-10<a class="headerlink" href="#train-cnn-over-cifar-10" title="Permalink to this headline">¶</a></h1> <p>Convolution neural network (CNN) is a type of feed-forward artificial neural network widely used for image and video classification. In this example, we will train three deep CNN models to do image classification for the CIFAR-10 dataset,</p> <ol class="simple"> -<li><p><a class="reference external" href="https://code.google.com/p/cuda-convnet/source/browse/trunk/example-layers/layers-18pct.cfg">AlexNet</a> -the best validation accuracy (without data augmentation) we achieved was about 82%.</p></li> -<li><p><a class="reference external" href="http://torch.ch/blog/2015/07/30/cifar.html">VGGNet</a>, the best validation accuracy (without data augmentation) we achieved was about 89%.</p></li> -<li><p><a class="reference external" href="https://github.com/facebook/fb.resnet.torch">ResNet</a>, the best validation accuracy (without data augmentation) we achieved was about 83%.</p></li> -<li><p><a class="reference external" href="https://github.com/BVLC/caffe/tree/master/examples/cifar10">Alexnet from Caffe</a>, SINGA is able to convert model from Caffe seamlessly.</p></li> +<li><a class="reference external" href="https://code.google.com/p/cuda-convnet/source/browse/trunk/example-layers/layers-18pct.cfg">AlexNet</a> +the best validation accuracy (without data augmentation) we achieved was about 82%.</li> +<li><a class="reference external" href="http://torch.ch/blog/2015/07/30/cifar.html">VGGNet</a>, the best validation accuracy (without data augmentation) we achieved was about 89%.</li> +<li><a class="reference external" href="https://github.com/facebook/fb.resnet.torch">ResNet</a>, the best validation accuracy (without data augmentation) we achieved was about 83%.</li> +<li><a class="reference external" href="https://github.com/BVLC/caffe/tree/master/examples/cifar10">Alexnet from Caffe</a>, SINGA is able to convert model from Caffe seamlessly.</li> </ol> <div class="section" id="instructions"> -<h2>Instructions<a class="headerlink" href="#instructions" title="Permalink to this headline">¶</a></h2> +<span id="instructions"></span><h2>Instructions<a class="headerlink" href="#instructions" title="Permalink to this headline">¶</a></h2> <div class="section" id="singa-installation"> -<h3>SINGA installation<a class="headerlink" href="#singa-installation" title="Permalink to this headline">¶</a></h3> +<span id="singa-installation"></span><h3>SINGA installation<a class="headerlink" href="#singa-installation" title="Permalink to this headline">¶</a></h3> <p>Users can compile and install SINGA from source or install the Python version. The code can ran on both CPU and GPU. For GPU training, CUDA and CUDNN (V4 or V5) are required. Please refer to the installation page for detailed instructions.</p> </div> <div class="section" id="data-preparation"> -<h3>Data preparation<a class="headerlink" href="#data-preparation" title="Permalink to this headline">¶</a></h3> +<span id="data-preparation"></span><h3>Data preparation<a class="headerlink" href="#data-preparation" title="Permalink to this headline">¶</a></h3> <p>The binary Cifar-10 dataset could be downloaded by</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="n">download_data</span><span class="o">.</span><span class="n">py</span> <span class="nb">bin</span> </pre></div> @@ -269,10 +245,10 @@ are required. Please refer to the instal </div> </div> <div class="section" id="training"> -<h3>Training<a class="headerlink" href="#training" title="Permalink to this headline">¶</a></h3> +<span id="training"></span><h3>Training<a class="headerlink" href="#training" title="Permalink to this headline">¶</a></h3> <p>There are four training programs</p> <ol> -<li><p>train.py. The following command would train the VGG model using the python +<li><p class="first">train.py. The following command would train the VGG model using the python version of the Cifar-10 dataset in âcifar-10-batches-pyâ folder.</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="n">python</span> <span class="n">train</span><span class="o">.</span><span class="n">py</span> <span class="n">vgg</span> <span class="n">cifar</span><span class="o">-</span><span class="mi">10</span><span class="o">-</span><span class="n">batches</span><span class="o">-</span><span class="n">py</span> </pre></div> @@ -285,23 +261,24 @@ argument</p> </pre></div> </div> </li> -<li><p>alexnet.cc. It trains the AlexNet model using the CPP APIs on a CudaGPU,</p> +<li><p class="first">alexnet.cc. It trains the AlexNet model using the CPP APIs on a CudaGPU,</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="o">./</span><span class="n">run</span><span class="o">.</span><span class="n">sh</span> </pre></div> </div> </li> -<li><p>alexnet-parallel.cc. It trains the AlexNet model using the CPP APIs on two CudaGPU devices. +<li><p class="first">alexnet-parallel.cc. It trains the AlexNet model using the CPP APIs on two CudaGPU devices. The two devices run synchronously to compute the gradients of the mode parameters, which are averaged on the host CPU device and then be applied to update the parameters.</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="o">./</span><span class="n">run</span><span class="o">-</span><span class="n">parallel</span><span class="o">.</span><span class="n">sh</span> </pre></div> </div> </li> -<li><p>vgg-parallel.cc. It trains the VGG model using the CPP APIs on two CudaGPU devices similar to alexnet-parallel.cc.</p></li> +<li><p class="first">vgg-parallel.cc. It trains the VGG model using the CPP APIs on two CudaGPU devices similar to alexnet-parallel.cc.</p> +</li> </ol> </div> <div class="section" id="prediction"> -<h3>Prediction<a class="headerlink" href="#prediction" title="Permalink to this headline">¶</a></h3> +<span id="prediction"></span><h3>Prediction<a class="headerlink" href="#prediction" title="Permalink to this headline">¶</a></h3> <p>predict.py includes the prediction function</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="k">def</span> <span class="nf">predict</span><span class="p">(</span><span class="n">net</span><span class="p">,</span> <span class="n">images</span><span class="p">,</span> <span class="n">dev</span><span class="p">,</span> <span class="n">topk</span><span class="o">=</span><span class="mi">5</span><span class="p">)</span> </pre></div> @@ -329,7 +306,7 @@ The âmodel.binâ file generated <a href="../char-rnn/README.html" class="btn btn-neutral float-right" title="Train Char-RNN over plain text" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> - <a href="../index.html" class="btn btn-neutral float-left" title="Model Zoo" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> + <a href="../index.html" class="btn btn-neutral" title="Model Zoo" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> </div> @@ -338,7 +315,7 @@ The âmodel.binâ file generated <div role="contentinfo"> <p> - © Copyright 2019 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 2019 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> @@ -355,17 +332,36 @@ The âmodel.binâ file generated + + + <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.enable(true); }); </script> - - - - - <div class="rst-versions" 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> Modified: incubator/singa/site/trunk/en/docs/model_zoo/examples/caffe/README.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/model_zoo/examples/caffe/README.html?rev=1862313&r1=1862312&r2=1862313&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/model_zoo/examples/caffe/README.html (original) +++ incubator/singa/site/trunk/en/docs/model_zoo/examples/caffe/README.html Sat Jun 29 14:42:24 2019 @@ -18,21 +18,15 @@ - <script type="text/javascript" src="../../../../_static/js/modernizr.min.js"></script> + + - <script type="text/javascript" id="documentation_options" data-url_root="../../../../" src="../../../../_static/documentation_options.js"></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/language_data.js"></script> - - <script type="text/javascript" src="../../../../_static/js/theme.js"></script> - + - <link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" /> + <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" /> @@ -48,16 +42,21 @@ } </style> + + + <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" > + <div class="wy-side-nav-search"> @@ -186,40 +185,41 @@ regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 + with the License. You may obtain a copy of the License at<div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">www</span><span class="o">.</span><span class="n">apache</span><span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="n">licenses</span><span class="o">/</span><span class="n">LICENSE</span><span class="o">-</span><span class="mf">2.0</span> - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---><div class="section" id="use-parameters-pre-trained-from-caffe-in-singa"> -<h1>Use parameters pre-trained from Caffe in SINGA<a class="headerlink" href="#use-parameters-pre-trained-from-caffe-in-singa" title="Permalink to this headline">¶</a></h1> +<span class="n">Unless</span> <span class="n">required</span> <span class="n">by</span> <span class="n">applicable</span> <span class="n">law</span> <span class="ow">or</span> <span class="n">agreed</span> <span class="n">to</span> <span class="ow">in</span> <span class="n">writing</span><span class="p">,</span> +<span class="n">software</span> <span class="n">distributed</span> <span class="n">under</span> <span class="n">the</span> <span class="n">License</span> <span class="ow">is</span> <span class="n">distributed</span> <span class="n">on</span> <span class="n">an</span> +<span class="s2">"AS IS"</span> <span class="n">BASIS</span><span class="p">,</span> <span class="n">WITHOUT</span> <span class="n">WARRANTIES</span> <span class="n">OR</span> <span class="n">CONDITIONS</span> <span class="n">OF</span> <span class="n">ANY</span> +<span class="n">KIND</span><span class="p">,</span> <span class="n">either</span> <span class="n">express</span> <span class="ow">or</span> <span class="n">implied</span><span class="o">.</span> <span class="n">See</span> <span class="n">the</span> <span class="n">License</span> <span class="k">for</span> <span class="n">the</span> +<span class="n">specific</span> <span class="n">language</span> <span class="n">governing</span> <span class="n">permissions</span> <span class="ow">and</span> <span class="n">limitations</span> +<span class="n">under</span> <span class="n">the</span> <span class="n">License</span><span class="o">.</span> +</pre></div> +</div> +<p>â></p> +<div class="section" id="use-parameters-pre-trained-from-caffe-in-singa"> +<span id="use-parameters-pre-trained-from-caffe-in-singa"></span><h1>Use parameters pre-trained from Caffe in SINGA<a class="headerlink" href="#use-parameters-pre-trained-from-caffe-in-singa" title="Permalink to this headline">¶</a></h1> <p>In this example, we use SINGA to load the VGG parameters trained by Caffe to do image classification.</p> <div class="section" id="run-this-example"> -<h2>Run this example<a class="headerlink" href="#run-this-example" title="Permalink to this headline">¶</a></h2> +<span id="run-this-example"></span><h2>Run this example<a class="headerlink" href="#run-this-example" title="Permalink to this headline">¶</a></h2> <p>You can run this example by simply executing <code class="docutils literal notranslate"><span class="pre">run.sh</span> <span class="pre">vgg16</span></code> or <code class="docutils literal notranslate"><span class="pre">run.sh</span> <span class="pre">vgg19</span></code> The script does the following work.</p> <div class="section" id="obtain-the-caffe-model"> -<h3>Obtain the Caffe model<a class="headerlink" href="#obtain-the-caffe-model" title="Permalink to this headline">¶</a></h3> +<span id="obtain-the-caffe-model"></span><h3>Obtain the Caffe model<a class="headerlink" href="#obtain-the-caffe-model" title="Permalink to this headline">¶</a></h3> <ul class="simple"> -<li><p>Download caffe model prototxt and parameter binary file.</p></li> -<li><p>Currently we only support the latest caffe format, if your model is in +<li>Download caffe model prototxt and parameter binary file.</li> +<li>Currently we only support the latest caffe format, if your model is in previous version of caffe, please update it to current format.(This is -supported by caffe)</p></li> -<li><p>After updating, we can obtain two files, i.e., the prototxt and parameter -binary file.</p></li> +supported by caffe)</li> +<li>After updating, we can obtain two files, i.e., the prototxt and parameter +binary file.</li> </ul> </div> <div class="section" id="prepare-test-images"> -<h3>Prepare test images<a class="headerlink" href="#prepare-test-images" title="Permalink to this headline">¶</a></h3> +<span id="prepare-test-images"></span><h3>Prepare test images<a class="headerlink" href="#prepare-test-images" title="Permalink to this headline">¶</a></h3> <p>A few sample images are downloaded into the <code class="docutils literal notranslate"><span class="pre">test</span></code> folder.</p> </div> <div class="section" id="predict"> -<h3>Predict<a class="headerlink" href="#predict" title="Permalink to this headline">¶</a></h3> +<span id="predict"></span><h3>Predict<a class="headerlink" href="#predict" title="Permalink to this headline">¶</a></h3> <p>The <code class="docutils literal notranslate"><span class="pre">predict.py</span></code> script creates the VGG model and read the parameters,</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">usage</span><span class="p">:</span> <span class="n">predict</span><span class="o">.</span><span class="n">py</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="n">model_txt</span> <span class="n">model_bin</span> <span class="n">imgclass</span> </pre></div> @@ -246,7 +246,7 @@ You can start the prediction program by <div role="contentinfo"> <p> - © Copyright 2019 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 2019 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> @@ -263,17 +263,36 @@ You can start the prediction program by + + + <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.enable(true); }); </script> - - - - - <div class="rst-versions" 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> Modified: incubator/singa/site/trunk/en/docs/model_zoo/examples/char-rnn/README.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/model_zoo/examples/char-rnn/README.html?rev=1862313&r1=1862312&r2=1862313&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/model_zoo/examples/char-rnn/README.html (original) +++ incubator/singa/site/trunk/en/docs/model_zoo/examples/char-rnn/README.html Sat Jun 29 14:42:24 2019 @@ -18,21 +18,15 @@ - <script type="text/javascript" src="../../../../_static/js/modernizr.min.js"></script> + + - <script type="text/javascript" id="documentation_options" data-url_root="../../../../" src="../../../../_static/documentation_options.js"></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/language_data.js"></script> - - <script type="text/javascript" src="../../../../_static/js/theme.js"></script> - + - <link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" /> + <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" /> @@ -48,16 +42,21 @@ } </style> + + + <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" > + <div class="wy-side-nav-search"> @@ -186,18 +185,19 @@ regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at + with the License. You may obtain a copy of the License at<div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">www</span><span class="o">.</span><span class="n">apache</span><span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="n">licenses</span><span class="o">/</span><span class="n">LICENSE</span><span class="o">-</span><span class="mf">2.0</span> - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---><div class="section" id="train-char-rnn-over-plain-text"> -<h1>Train Char-RNN over plain text<a class="headerlink" href="#train-char-rnn-over-plain-text" title="Permalink to this headline">¶</a></h1> +<span class="n">Unless</span> <span class="n">required</span> <span class="n">by</span> <span class="n">applicable</span> <span class="n">law</span> <span class="ow">or</span> <span class="n">agreed</span> <span class="n">to</span> <span class="ow">in</span> <span class="n">writing</span><span class="p">,</span> +<span class="n">software</span> <span class="n">distributed</span> <span class="n">under</span> <span class="n">the</span> <span class="n">License</span> <span class="ow">is</span> <span class="n">distributed</span> <span class="n">on</span> <span class="n">an</span> +<span class="s2">"AS IS"</span> <span class="n">BASIS</span><span class="p">,</span> <span class="n">WITHOUT</span> <span class="n">WARRANTIES</span> <span class="n">OR</span> <span class="n">CONDITIONS</span> <span class="n">OF</span> <span class="n">ANY</span> +<span class="n">KIND</span><span class="p">,</span> <span class="n">either</span> <span class="n">express</span> <span class="ow">or</span> <span class="n">implied</span><span class="o">.</span> <span class="n">See</span> <span class="n">the</span> <span class="n">License</span> <span class="k">for</span> <span class="n">the</span> +<span class="n">specific</span> <span class="n">language</span> <span class="n">governing</span> <span class="n">permissions</span> <span class="ow">and</span> <span class="n">limitations</span> +<span class="n">under</span> <span class="n">the</span> <span class="n">License</span><span class="o">.</span> +</pre></div> +</div> +<p>â></p> +<div class="section" id="train-char-rnn-over-plain-text"> +<span id="train-char-rnn-over-plain-text"></span><h1>Train Char-RNN over plain text<a class="headerlink" href="#train-char-rnn-over-plain-text" title="Permalink to this headline">¶</a></h1> <p>Recurrent neural networks (RNN) are widely used for modelling sequential data, e.g., natural language sentences. This example describes how to implement a RNN application (or model) using SINGAâs RNN layers. @@ -207,12 +207,14 @@ source code, with each character as an i a RNN using GRU over Linux kernel source code. After training, we expect to generate meaningful code from the model.</p> <div class="section" id="instructions"> -<h2>Instructions<a class="headerlink" href="#instructions" title="Permalink to this headline">¶</a></h2> +<span id="instructions"></span><h2>Instructions<a class="headerlink" href="#instructions" title="Permalink to this headline">¶</a></h2> <ul> -<li><p>Compile and install SINGA. Currently the RNN implementation depends on Cudnn with version >= 5.05.</p></li> -<li><p>Prepare the dataset. Download the <a class="reference external" href="http://cs.stanford.edu/people/karpathy/char-rnn/">kernel source code</a>. -Other plain text files can also be used.</p></li> -<li><p>Start the training,</p> +<li><p class="first">Compile and install SINGA. Currently the RNN implementation depends on Cudnn with version >= 5.05.</p> +</li> +<li><p class="first">Prepare the dataset. Download the <a class="reference external" href="http://cs.stanford.edu/people/karpathy/char-rnn/">kernel source code</a>. +Other plain text files can also be used.</p> +</li> +<li><p class="first">Start the training,</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="n">python</span> <span class="n">train</span><span class="o">.</span><span class="n">py</span> <span class="n">linux_input</span><span class="o">.</span><span class="n">txt</span> </pre></div> </div> @@ -221,7 +223,7 @@ Other plain text files can also be used. </pre></div> </div> </li> -<li><p>Sample characters from the model by providing the number of characters to sample and the seed string.</p> +<li><p class="first">Sample characters from the model by providing the number of characters to sample and the seed string.</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="n">python</span> <span class="n">sample</span><span class="o">.</span><span class="n">py</span> <span class="s1">'model.bin'</span> <span class="mi">100</span> <span class="o">--</span><span class="n">seed</span> <span class="s1">'#include <std'</span> </pre></div> </div> @@ -242,7 +244,7 @@ Other plain text files can also be used. <div role="contentinfo"> <p> - © Copyright 2019 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 2019 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> @@ -259,17 +261,36 @@ Other plain text files can also be used. + + + <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.enable(true); }); </script> - - - - - <div class="rst-versions" 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>
