Modified: incubator/singa/site/trunk/en/docs/neural-net.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/neural-net.html?rev=1862313&r1=1862312&r2=1862313&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/neural-net.html (original) +++ incubator/singa/site/trunk/en/docs/neural-net.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,32 +185,34 @@ 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="neural-net"> -<h1>Neural Net<a class="headerlink" href="#neural-net" 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="neural-net"> +<span id="neural-net"></span><h1>Neural Net<a class="headerlink" href="#neural-net" title="Permalink to this headline">¶</a></h1> <p><code class="docutils literal notranslate"><span class="pre">NeuralNet</span></code> in SINGA represents an instance of userâs neural net model. As the neural net typically consists of a set of layers, <code class="docutils literal notranslate"><span class="pre">NeuralNet</span></code> comprises a set of unidirectionally connected <a class="reference external" href="layer.html">Layer</a>s. This page describes how to convert an userâs neural net into the configuration of <code class="docutils literal notranslate"><span class="pre">NeuralNet</span></code>.</p> -<img src="../_static/images/model-category.png" align="center" width="200px"/> -<span><strong>Figure 1 - Categorization of popular deep learning models.</strong></span><div class="section" id="net-structure-configuration"> -<h2>Net structure configuration<a class="headerlink" href="#net-structure-configuration" title="Permalink to this headline">¶</a></h2> +<p><img src="../_static/images/model-category.png" align="center" width="200px"/> +<span><strong>Figure 1 - Categorization of popular deep learning models.</strong></span></p> +<div class="section" id="net-structure-configuration"> +<span id="net-structure-configuration"></span><h2>Net structure configuration<a class="headerlink" href="#net-structure-configuration" title="Permalink to this headline">¶</a></h2> <p>Users configure the <code class="docutils literal notranslate"><span class="pre">NeuralNet</span></code> by listing all layers of the neural net and specifying each layerâs source layer names. Popular deep learning models can be categorized as Figure 1. The subsequent sections give details for each category.</p> <div class="section" id="feed-forward-models"> -<h3>Feed-forward models<a class="headerlink" href="#feed-forward-models" title="Permalink to this headline">¶</a></h3> +<span id="feed-forward-models"></span><h3>Feed-forward models<a class="headerlink" href="#feed-forward-models" title="Permalink to this headline">¶</a></h3> <div align = "left"> <img src="../_static/images/mlp-net.png" align="center" width="200px"/> <span><strong>Figure 2 - Net structure of a MLP model.</strong></span> @@ -249,9 +250,10 @@ configuration for the MLP model shown in </div> </div> <div class="section" id="energy-models"> -<h3>Energy models<a class="headerlink" href="#energy-models" title="Permalink to this headline">¶</a></h3> -<img src="../_static/images/rbm-rnn.png" align="center" width="500px"/> -<span><strong>Figure 3 - Convert connections in RBM and RNN.</strong></span><p>For energy models including RBM, DBM, +<span id="energy-models"></span><h3>Energy models<a class="headerlink" href="#energy-models" title="Permalink to this headline">¶</a></h3> +<p><img src="../_static/images/rbm-rnn.png" align="center" width="500px"/> +<span><strong>Figure 3 - Convert connections in RBM and RNN.</strong></span></p> +<p>For energy models including RBM, DBM, etc., their connections are undirected (i.e., Category B). To represent these models using <code class="docutils literal notranslate"><span class="pre">NeuralNet</span></code>, users can simply replace each connection with two directed connections, as shown in Figure 3a. In other words, for each pair of connected layers, their source @@ -281,7 +283,7 @@ detailed neural net configuration for a </div> </div> <div class="section" id="rnn-models"> -<h3>RNN models<a class="headerlink" href="#rnn-models" title="Permalink to this headline">¶</a></h3> +<span id="rnn-models"></span><h3>RNN models<a class="headerlink" href="#rnn-models" title="Permalink to this headline">¶</a></h3> <p>For recurrent neural networks (RNN), users can remove the recurrent connections by unrolling the recurrent layer. For example, in Figure 3b, the original layer is unrolled into a new layer with 4 internal layers. In this way, the @@ -291,7 +293,7 @@ configuration for a RNN model.</p> </div> </div> <div class="section" id="configuration-for-multiple-nets"> -<h2>Configuration for multiple nets<a class="headerlink" href="#configuration-for-multiple-nets" title="Permalink to this headline">¶</a></h2> +<span id="configuration-for-multiple-nets"></span><h2>Configuration for multiple nets<a class="headerlink" href="#configuration-for-multiple-nets" title="Permalink to this headline">¶</a></h2> <p>Typically, a training job includes three neural nets for training, validation and test phase respectively. The three neural nets share most layers except the data layer, loss layer or output layer, etc.. To avoid @@ -306,13 +308,14 @@ filtered when creating the testing <code </div> </div> <div class="section" id="neural-net-partitioning"> -<h2>Neural net partitioning<a class="headerlink" href="#neural-net-partitioning" title="Permalink to this headline">¶</a></h2> +<span id="neural-net-partitioning"></span><h2>Neural net partitioning<a class="headerlink" href="#neural-net-partitioning" title="Permalink to this headline">¶</a></h2> <p>A neural net can be partitioned in different ways to distribute the training over multiple workers.</p> <div class="section" id="batch-and-feature-dimension"> -<h3>Batch and feature dimension<a class="headerlink" href="#batch-and-feature-dimension" title="Permalink to this headline">¶</a></h3> -<img src="../_static/images/partition_fc.png" align="center" width="400px"/> -<span><strong>Figure 4 - Partitioning of a fully connected layer.</strong></span><p>Every layerâs feature blob is considered a matrix whose rows are feature +<span id="batch-and-feature-dimension"></span><h3>Batch and feature dimension<a class="headerlink" href="#batch-and-feature-dimension" title="Permalink to this headline">¶</a></h3> +<p><img src="../_static/images/partition_fc.png" align="center" width="400px"/> +<span><strong>Figure 4 - Partitioning of a fully connected layer.</strong></span></p> +<p>Every layerâs feature blob is considered a matrix whose rows are feature vectors. Thus, one layer can be split on two dimensions. Partitioning on dimension 0 (also called batch dimension) slices the feature matrix by rows. For instance, if the mini-batch size is 256 and the layer is partitioned into 2 @@ -327,10 +330,10 @@ Figure 4. Both the bias vector and weigh partitioned into two sub-layers.</p> </div> <div class="section" id="partitioning-configuration"> -<h3>Partitioning configuration<a class="headerlink" href="#partitioning-configuration" title="Permalink to this headline">¶</a></h3> +<span id="partitioning-configuration"></span><h3>Partitioning configuration<a class="headerlink" href="#partitioning-configuration" title="Permalink to this headline">¶</a></h3> <p>There are 4 partitioning schemes, whose configurations are give below,</p> <ol> -<li><p>Partitioning each singe layer into sub-layers on batch dimension (see +<li><p class="first">Partitioning each singe layer into sub-layers on batch dimension (see below). It is enabled by configuring the partition dimension of the layer to 0, e.g.,</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="c1"># with other fields omitted</span> @@ -340,7 +343,7 @@ below). It is enabled by configuring the </pre></div> </div> </li> -<li><p>Partitioning each singe layer into sub-layers on feature dimension (see +<li><p class="first">Partitioning each singe layer into sub-layers on feature dimension (see below). It is enabled by configuring the partition dimension of the layer to 1, e.g.,</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="c1"># with other fields omitted</span> @@ -350,7 +353,7 @@ below). It is enabled by configuring th </pre></div> </div> </li> -<li><p>Partitioning all layers into different subsets. It is enabled by +<li><p class="first">Partitioning all layers into different subsets. It is enabled by configuring the location ID of a layer, e.g.,</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="c1"># with other fields omitted</span> <span class="n">layer</span> <span class="p">{</span> @@ -362,7 +365,9 @@ configuring the location ID of a layer, </pre></div> </div> </li> -<li><p>Hybrid partitioning of strategy 1, 2 and 3. The hybrid partitioning is +</ol> +<ol> +<li><p class="first">Hybrid partitioning of strategy 1, 2 and 3. The hybrid partitioning is useful for large models. An example application is to implement the <a class="reference external" href="http://arxiv.org/abs/1404.5997">idea proposed by Alex</a>. Hybrid partitioning is configured like,</p> @@ -390,19 +395,19 @@ are under test and will be released in l </div> </div> <div class="section" id="parameter-sharing"> -<h2>Parameter sharing<a class="headerlink" href="#parameter-sharing" title="Permalink to this headline">¶</a></h2> +<span id="parameter-sharing"></span><h2>Parameter sharing<a class="headerlink" href="#parameter-sharing" title="Permalink to this headline">¶</a></h2> <p>Parameters can be shared in two cases,</p> <ul class="simple"> -<li><p>sharing parameters among layers via user configuration. For example, the +<li>sharing parameters among layers via user configuration. For example, the visible layer and hidden layer of a RBM shares the weight matrix, which is configured through the <code class="docutils literal notranslate"><span class="pre">share_from</span></code> field as shown in the above RBM configuration. The -configurations must be the same (except name) for shared parameters.</p></li> -<li><p>due to neural net partitioning, some <code class="docutils literal notranslate"><span class="pre">Param</span></code> objects are replicated into +configurations must be the same (except name) for shared parameters.</li> +<li>due to neural net partitioning, some <code class="docutils literal notranslate"><span class="pre">Param</span></code> objects are replicated into different workers, e.g., partitioning one layer on batch dimension. These workers share parameter values. SINGA controls this kind of parameter -sharing automatically, users do not need to do any configuration.</p></li> -<li><p>the <code class="docutils literal notranslate"><span class="pre">NeuralNet</span></code> for training and testing (and validation) share most layers -, thus share <code class="docutils literal notranslate"><span class="pre">Param</span></code> values.</p></li> +sharing automatically, users do not need to do any configuration.</li> +<li>the <code class="docutils literal notranslate"><span class="pre">NeuralNet</span></code> for training and testing (and validation) share most layers +, thus share <code class="docutils literal notranslate"><span class="pre">Param</span></code> values.</li> </ul> <p>If the shared <code class="docutils literal notranslate"><span class="pre">Param</span></code> instances resident in the same process (may in different threads), they use the same chunk of memory space for their values. But they @@ -410,9 +415,9 @@ would have different memory spaces for t gradients will be averaged by the stub or server.</p> </div> <div class="section" id="advanced-user-guide"> -<h2>Advanced user guide<a class="headerlink" href="#advanced-user-guide" title="Permalink to this headline">¶</a></h2> +<span id="advanced-user-guide"></span><h2>Advanced user guide<a class="headerlink" href="#advanced-user-guide" title="Permalink to this headline">¶</a></h2> <div class="section" id="creation"> -<h3>Creation<a class="headerlink" href="#creation" title="Permalink to this headline">¶</a></h3> +<span id="creation"></span><h3>Creation<a class="headerlink" href="#creation" title="Permalink to this headline">¶</a></h3> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">static</span> <span class="n">NeuralNet</span><span class="o">*</span> <span class="n">NeuralNet</span><span class="p">::</span><span class="n">Create</span><span class="p">(</span><span class="n">const</span> <span class="n">NetProto</span><span class="o">&</span> <span class="n">np</span><span class="p">,</span> <span class="n">Phase</span> <span class="n">phase</span><span class="p">,</span> <span class="nb">int</span> <span class="n">num</span><span class="p">);</span> </pre></div> </div> @@ -448,8 +453,8 @@ connected.</p> <p>Since the <code class="docutils literal notranslate"><span class="pre">NeuralNet</span></code> instance may be shared among multiple workers, the <code class="docutils literal notranslate"><span class="pre">Create</span></code> function returns a pointer to the <code class="docutils literal notranslate"><span class="pre">NeuralNet</span></code> instance .</p> </div> -<div class="section" id="id1"> -<h3>Parameter sharing<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3> +<div class="section" id="parameter-sharing"> +<span id="id1"></span><h3>Parameter sharing<a class="headerlink" href="#parameter-sharing" title="Permalink to this headline">¶</a></h3> <p><code class="docutils literal notranslate"><span class="pre">Param</span></code> sharing is enabled by first sharing the Param configuration (in <code class="docutils literal notranslate"><span class="pre">NeuralNet::Create</span></code>) to create two similar (e.g., the same shape) Param objects, and then calling @@ -465,7 +470,7 @@ the training net and the test net,</p> <p>It will call <code class="docutils literal notranslate"><span class="pre">Param::ShareFrom</span></code> for each Param object.</p> </div> <div class="section" id="access-functions"> -<h3>Access functions<a class="headerlink" href="#access-functions" title="Permalink to this headline">¶</a></h3> +<span id="access-functions"></span><h3>Access functions<a class="headerlink" href="#access-functions" title="Permalink to this headline">¶</a></h3> <p><code class="docutils literal notranslate"><span class="pre">NeuralNet</span></code> provides a couple of access function to get the layers and params of the net:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">const</span> <span class="n">std</span><span class="p">::</span><span class="n">vector</span><span class="o"><</span><span class="n">Layer</span><span class="o">*>&</span> <span class="n">layers</span><span class="p">()</span> <span class="n">const</span><span class="p">;</span> @@ -476,9 +481,9 @@ of the net:</p> </div> </div> <div class="section" id="partitioning"> -<h3>Partitioning<a class="headerlink" href="#partitioning" title="Permalink to this headline">¶</a></h3> +<span id="partitioning"></span><h3>Partitioning<a class="headerlink" href="#partitioning" title="Permalink to this headline">¶</a></h3> <div class="section" id="implementation"> -<h4>Implementation<a class="headerlink" href="#implementation" title="Permalink to this headline">¶</a></h4> +<span id="implementation"></span><h4>Implementation<a class="headerlink" href="#implementation" title="Permalink to this headline">¶</a></h4> <p>SINGA partitions the neural net in <code class="docutils literal notranslate"><span class="pre">CreateGraph</span></code> function, which creates one node for each (partitioned) layer. For example, if one layerâs partition dimension is 0 or 1, then it creates <code class="docutils literal notranslate"><span class="pre">npartition</span></code> nodes for it; if the @@ -496,7 +501,7 @@ inserted. These connection layers help m synchronization transparent to the users.</p> </div> <div class="section" id="dispatching-partitions-to-workers"> -<h4>Dispatching partitions to workers<a class="headerlink" href="#dispatching-partitions-to-workers" title="Permalink to this headline">¶</a></h4> +<span id="dispatching-partitions-to-workers"></span><h4>Dispatching partitions to workers<a class="headerlink" href="#dispatching-partitions-to-workers" title="Permalink to this headline">¶</a></h4> <p>Each (partitioned) layer is assigned a location ID, based on which it is dispatched to one worker. Particularly, the pointer to the <code class="docutils literal notranslate"><span class="pre">NeuralNet</span></code> instance is passed to every worker within the same group, but each worker only computes over the @@ -526,7 +531,7 @@ lower layers and <code class="docutils l <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> @@ -543,17 +548,36 @@ lower layers and <code class="docutils l + + + <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/notebook/README.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/notebook/README.html?rev=1862313&r1=1862312&r2=1862313&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/notebook/README.html (original) +++ incubator/singa/site/trunk/en/docs/notebook/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,17 +185,18 @@ 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. ---><p>These are some examples in IPython notebooks.</p> +<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>â> +These are some examples in IPython notebooks.</p> <p>You can open them in <a class="reference external" href="http://nbviewer.jupyter.org/github/apache/incubator-singa/blob/master/doc/en/docs/notebook/index.ipynb">notebook viewer</a>.</p> @@ -210,7 +210,7 @@ <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> @@ -227,17 +227,36 @@ + + + <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/optimizer.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/optimizer.html?rev=1862313&r1=1862312&r2=1862313&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/optimizer.html (original) +++ incubator/singa/site/trunk/en/docs/optimizer.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> @@ -228,29 +226,33 @@ <p>The base python optimizer class.</p> <p>Typically, an optimizer is used as follows:</p> <ol class="arabic simple"> -<li><p>construct the optimizer</p></li> -<li><p>(optional) register each parameter with its specs.</p></li> -<li><p>use the optimizer to update parameter values given parameter gradients -and other optional info</p></li> +<li>construct the optimizer</li> +<li>(optional) register each parameter with its specs.</li> +<li>use the optimizer to update parameter values given parameter gradients +and other optional info</li> </ol> <p>The subclasses should override the apply_with_lr function to do the real parameter udpate.</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><ul class="simple"> -<li><p><strong>lr</strong> (<em>float</em>) â a constant value for the learning rate</p></li> -<li><p><strong>momentum</strong> (<em>float</em>) â a constant value for the momentum value</p></li> -<li><p><strong>weight_decay</strong> (<em>float</em>) â the coefficent for L2 regularizer, which is -mutually exclusive with âregularizerâ.</p></li> -<li><p><strong>regularizer</strong> â an instance of Regularizer or RegularizerConf; If set, +<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>lr</strong> (<em>float</em>) â a constant value for the learning rate</li> +<li><strong>momentum</strong> (<em>float</em>) â a constant value for the momentum value</li> +<li><strong>weight_decay</strong> (<em>float</em>) â the coefficent for L2 regularizer, which is +mutually exclusive with âregularizerâ.</li> +<li><strong>regularizer</strong> â an instance of Regularizer or RegularizerConf; If set, regularization would be applied in apply_with_lr(). -Users can also do regularization outside.</p></li> -<li><p><strong>constraint</strong> â an instance of Constraint or ConstraintConf; If set, +Users can also do regularization outside.</li> +<li><strong>constraint</strong> â an instance of Constraint or ConstraintConf; If set, constraint would be applied inside apply_with_lr(). Users can -also apply constraint outside.</p></li> +also apply constraint outside.</li> </ul> -</dd> -</dl> +</td> +</tr> +</tbody> +</table> <dl class="method"> <dt id="singa.optimizer.Optimizer.register"> <code class="descname">register</code><span class="sig-paren">(</span><em>name</em>, <em>specs</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.optimizer.Optimizer.register" title="Permalink to this definition">¶</a></dt> @@ -259,15 +261,19 @@ constraint per param object. Param speci have higher priority than the global ones. If all parameters share the same setting for learning rate, regularizer and constraint, then there is no need to call this function.</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><ul class="simple"> -<li><p><strong>name</strong> (<em>str</em>) â parameter name</p></li> -<li><p><strong>specs</strong> (<em>ParamSpec</em>) â protobuf obj, including regularizer and -constraint, multipliers for learning rate and weight decay.</p></li> -</ul> -</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">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>name</strong> (<em>str</em>) â parameter name</li> +<li><strong>specs</strong> (<em>ParamSpec</em>) â protobuf obj, including regularizer and +constraint, multipliers for learning rate and weight decay.</li> +</ul> +</td> +</tr> +</tbody> +</table> </dd></dl> <dl class="method"> @@ -276,20 +282,24 @@ constraint, multipliers for learning rat <dd><p>Apply regularization and constraint if available.</p> <p>If there are both global regularizer (constraint) and param specific regularizer (constraint), it would use the param specific one.</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><ul class="simple"> -<li><p><strong>epoch</strong> (<em>int</em>) â training epoch ID</p></li> -<li><p><strong>value</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â parameter value Tensor</p></li> -<li><p><strong>grad</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â parameter gradient Tensor</p></li> -<li><p><strong>name</strong> (<em>string</em>) â to get parameter specific regularizer or constraint</p></li> -<li><p><strong>step</strong> (<em>int</em>) â iteration ID within one epoch</p></li> -</ul> -</dd> -<dt class="field-even">Returns</dt> -<dd class="field-even"><p>the updated gradient Tensor</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">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>epoch</strong> (<em>int</em>) â training epoch ID</li> +<li><strong>value</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â parameter value Tensor</li> +<li><strong>grad</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â parameter gradient Tensor</li> +<li><strong>name</strong> (<em>string</em>) â to get parameter specific regularizer or constraint</li> +<li><strong>step</strong> (<em>int</em>) â iteration ID within one epoch</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the updated gradient Tensor</p> +</td> +</tr> +</tbody> +</table> </dd></dl> <dl class="method"> @@ -299,22 +309,26 @@ regularizer (constraint), it would use t empty.</p> <p>The subclass optimizer must override this function. This function do nothing if the grad is empty.</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><ul class="simple"> -<li><p><strong>epoch</strong> (<em>int</em>) â training epoch ID</p></li> -<li><p><strong>lr</strong> (<em>float</em>) â learning rate</p></li> -<li><p><strong>grad</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â parameter gradient</p></li> -<li><p><strong>value</strong> (<em>Tesnor</em>) â parameter value</p></li> -<li><p><strong>name</strong> (<em>string</em>) â paramter name to index parameter specific -updating rules (including regularizer and constraint)</p></li> -<li><p><strong>step</strong> (<em>int</em>) â iteration ID within one epoch</p></li> -</ul> -</dd> -<dt class="field-even">Returns</dt> -<dd class="field-even"><p>updated parameter value</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">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>epoch</strong> (<em>int</em>) â training epoch ID</li> +<li><strong>lr</strong> (<em>float</em>) â learning rate</li> +<li><strong>grad</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â parameter gradient</li> +<li><strong>value</strong> (<em>Tesnor</em>) â parameter value</li> +<li><strong>name</strong> (<em>string</em>) â paramter name to index parameter specific +updating rules (including regularizer and constraint)</li> +<li><strong>step</strong> (<em>int</em>) â iteration ID within one epoch</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">updated parameter value</p> +</td> +</tr> +</tbody> +</table> </dd></dl> <dl class="method"> @@ -322,21 +336,25 @@ updating rules (including regularizer an <code class="descname">apply</code><span class="sig-paren">(</span><em>epoch</em>, <em>grad</em>, <em>value</em>, <em>name=None</em>, <em>step=-1</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.optimizer.Optimizer.apply" title="Permalink to this definition">¶</a></dt> <dd><p>Do update assuming the learning rate generator is set.</p> <p>The subclass optimizer does not need to override this function.</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><ul class="simple"> -<li><p><strong>epoch</strong> (<em>int</em>) â training epoch ID</p></li> -<li><p><strong>grad</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â parameter gradient</p></li> -<li><p><strong>value</strong> (<em>Tesnor</em>) â parameter value</p></li> -<li><p><strong>name</strong> (<em>string</em>) â paramter name to retrieval parameter specific -updating rules (including regularizer and constraint)</p></li> -<li><p><strong>step</strong> (<em>int</em>) â training iteration ID within one epoch</p></li> -</ul> -</dd> -<dt class="field-even">Returns</dt> -<dd class="field-even"><p>updated parameter value</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">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>epoch</strong> (<em>int</em>) â training epoch ID</li> +<li><strong>grad</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â parameter gradient</li> +<li><strong>value</strong> (<em>Tesnor</em>) â parameter value</li> +<li><strong>name</strong> (<em>string</em>) â paramter name to retrieval parameter specific +updating rules (including regularizer and constraint)</li> +<li><strong>step</strong> (<em>int</em>) â training iteration ID within one epoch</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">updated parameter value</p> +</td> +</tr> +</tbody> +</table> </dd></dl> </dd></dl> @@ -354,22 +372,26 @@ updating rules (including regularizer an empty.</p> <p>The subclass optimizer must override this function. This function do nothing if the grad is empty.</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><ul class="simple"> -<li><p><strong>epoch</strong> (<em>int</em>) â training epoch ID</p></li> -<li><p><strong>lr</strong> (<em>float</em>) â learning rate</p></li> -<li><p><strong>grad</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â parameter gradient</p></li> -<li><p><strong>value</strong> (<em>Tesnor</em>) â parameter value</p></li> -<li><p><strong>name</strong> (<em>string</em>) â paramter name to index parameter specific -updating rules (including regularizer and constraint)</p></li> -<li><p><strong>step</strong> (<em>int</em>) â iteration ID within one epoch</p></li> -</ul> -</dd> -<dt class="field-even">Returns</dt> -<dd class="field-even"><p>updated parameter value</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">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>epoch</strong> (<em>int</em>) â training epoch ID</li> +<li><strong>lr</strong> (<em>float</em>) â learning rate</li> +<li><strong>grad</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â parameter gradient</li> +<li><strong>value</strong> (<em>Tesnor</em>) â parameter value</li> +<li><strong>name</strong> (<em>string</em>) â paramter name to index parameter specific +updating rules (including regularizer and constraint)</li> +<li><strong>step</strong> (<em>int</em>) â iteration ID within one epoch</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">updated parameter value</p> +</td> +</tr> +</tbody> +</table> </dd></dl> </dd></dl> @@ -387,22 +409,26 @@ updating rules (including regularizer an empty.</p> <p>The subclass optimizer must override this function. This function do nothing if the grad is empty.</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><ul class="simple"> -<li><p><strong>epoch</strong> (<em>int</em>) â training epoch ID</p></li> -<li><p><strong>lr</strong> (<em>float</em>) â learning rate</p></li> -<li><p><strong>grad</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â parameter gradient</p></li> -<li><p><strong>value</strong> (<em>Tesnor</em>) â parameter value</p></li> -<li><p><strong>name</strong> (<em>string</em>) â paramter name to index parameter specific -updating rules (including regularizer and constraint)</p></li> -<li><p><strong>step</strong> (<em>int</em>) â iteration ID within one epoch</p></li> -</ul> -</dd> -<dt class="field-even">Returns</dt> -<dd class="field-even"><p>updated parameter value</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">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>epoch</strong> (<em>int</em>) â training epoch ID</li> +<li><strong>lr</strong> (<em>float</em>) â learning rate</li> +<li><strong>grad</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â parameter gradient</li> +<li><strong>value</strong> (<em>Tesnor</em>) â parameter value</li> +<li><strong>name</strong> (<em>string</em>) â paramter name to index parameter specific +updating rules (including regularizer and constraint)</li> +<li><strong>step</strong> (<em>int</em>) â iteration ID within one epoch</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">updated parameter value</p> +</td> +</tr> +</tbody> +</table> </dd></dl> </dd></dl> @@ -413,14 +439,18 @@ updating rules (including regularizer an <dd><p>Bases: <a class="reference internal" href="#singa.optimizer.Optimizer" title="singa.optimizer.Optimizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">singa.optimizer.Optimizer</span></code></a></p> <p>RMSProp optimizer.</p> <p>See the base Optimizer for all constructor args.</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><ul class="simple"> -<li><p><strong>rho</strong> (<em>float</em>) â float within [0, 1]</p></li> -<li><p><strong>epsilon</strong> (<em>float</em>) â small value for preventing numeric error</p></li> -</ul> -</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">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>rho</strong> (<em>float</em>) â float within [0, 1]</li> +<li><strong>epsilon</strong> (<em>float</em>) â small value for preventing numeric error</li> +</ul> +</td> +</tr> +</tbody> +</table> <dl class="method"> <dt id="singa.optimizer.RMSProp.apply_with_lr"> <code class="descname">apply_with_lr</code><span class="sig-paren">(</span><em>epoch</em>, <em>lr</em>, <em>grad</em>, <em>value</em>, <em>name</em>, <em>step=-1</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.optimizer.RMSProp.apply_with_lr" title="Permalink to this definition">¶</a></dt> @@ -428,22 +458,26 @@ updating rules (including regularizer an empty.</p> <p>The subclass optimizer must override this function. This function do nothing if the grad is empty.</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><ul class="simple"> -<li><p><strong>epoch</strong> (<em>int</em>) â training epoch ID</p></li> -<li><p><strong>lr</strong> (<em>float</em>) â learning rate</p></li> -<li><p><strong>grad</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â parameter gradient</p></li> -<li><p><strong>value</strong> (<em>Tesnor</em>) â parameter value</p></li> -<li><p><strong>name</strong> (<em>string</em>) â paramter name to index parameter specific -updating rules (including regularizer and constraint)</p></li> -<li><p><strong>step</strong> (<em>int</em>) â iteration ID within one epoch</p></li> -</ul> -</dd> -<dt class="field-even">Returns</dt> -<dd class="field-even"><p>updated parameter value</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">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>epoch</strong> (<em>int</em>) â training epoch ID</li> +<li><strong>lr</strong> (<em>float</em>) â learning rate</li> +<li><strong>grad</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â parameter gradient</li> +<li><strong>value</strong> (<em>Tesnor</em>) â parameter value</li> +<li><strong>name</strong> (<em>string</em>) â paramter name to index parameter specific +updating rules (including regularizer and constraint)</li> +<li><strong>step</strong> (<em>int</em>) â iteration ID within one epoch</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">updated parameter value</p> +</td> +</tr> +</tbody> +</table> </dd></dl> </dd></dl> @@ -454,11 +488,14 @@ updating rules (including regularizer an <dd><p>Bases: <a class="reference internal" href="#singa.optimizer.Optimizer" title="singa.optimizer.Optimizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">singa.optimizer.Optimizer</span></code></a></p> <p>AdaGrad optimizer.</p> <p>See the base Optimizer for all constructor args.</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><p><strong>epsilon</strong> (<em>float</em>) â small number for preventing numeric 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">Parameters:</th><td class="field-body"><strong>epsilon</strong> (<em>float</em>) â small number for preventing numeric error.</td> +</tr> +</tbody> +</table> <dl class="method"> <dt id="singa.optimizer.AdaGrad.apply_with_lr"> <code class="descname">apply_with_lr</code><span class="sig-paren">(</span><em>epoch</em>, <em>lr</em>, <em>grad</em>, <em>value</em>, <em>name</em>, <em>step=-1</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.optimizer.AdaGrad.apply_with_lr" title="Permalink to this definition">¶</a></dt> @@ -466,22 +503,26 @@ updating rules (including regularizer an empty.</p> <p>The subclass optimizer must override this function. This function do nothing if the grad is empty.</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><ul class="simple"> -<li><p><strong>epoch</strong> (<em>int</em>) â training epoch ID</p></li> -<li><p><strong>lr</strong> (<em>float</em>) â learning rate</p></li> -<li><p><strong>grad</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â parameter gradient</p></li> -<li><p><strong>value</strong> (<em>Tesnor</em>) â parameter value</p></li> -<li><p><strong>name</strong> (<em>string</em>) â paramter name to index parameter specific -updating rules (including regularizer and constraint)</p></li> -<li><p><strong>step</strong> (<em>int</em>) â iteration ID within one epoch</p></li> -</ul> -</dd> -<dt class="field-even">Returns</dt> -<dd class="field-even"><p>updated parameter value</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">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>epoch</strong> (<em>int</em>) â training epoch ID</li> +<li><strong>lr</strong> (<em>float</em>) â learning rate</li> +<li><strong>grad</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â parameter gradient</li> +<li><strong>value</strong> (<em>Tesnor</em>) â parameter value</li> +<li><strong>name</strong> (<em>string</em>) â paramter name to index parameter specific +updating rules (including regularizer and constraint)</li> +<li><strong>step</strong> (<em>int</em>) â iteration ID within one epoch</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">updated parameter value</p> +</td> +</tr> +</tbody> +</table> </dd></dl> </dd></dl> @@ -492,24 +533,31 @@ updating rules (including regularizer an <dd><p>Bases: <a class="reference internal" href="#singa.optimizer.Optimizer" title="singa.optimizer.Optimizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">singa.optimizer.Optimizer</span></code></a></p> <p>Adam optimizer.</p> <p>See the base Optimizer for all constructor args.</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><ul class="simple"> -<li><p><strong>beta_1</strong> (<em>float</em>) â coefficient of momentum</p></li> -<li><p><strong>beta_2</strong> (<em>float</em>) â coefficient of aggregated squared gradient</p></li> -<li><p><strong>epsilon</strong> (<em>float</em>) â small value for preventing numeric error</p></li> -</ul> -</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">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>beta_1</strong> (<em>float</em>) â coefficient of momentum</li> +<li><strong>beta_2</strong> (<em>float</em>) â coefficient of aggregated squared gradient</li> +<li><strong>epsilon</strong> (<em>float</em>) â small value for preventing numeric error</li> +</ul> +</td> +</tr> +</tbody> +</table> <dl class="method"> <dt id="singa.optimizer.Adam.apply_with_lr"> <code class="descname">apply_with_lr</code><span class="sig-paren">(</span><em>epoch</em>, <em>lr</em>, <em>grad</em>, <em>value</em>, <em>name</em>, <em>step</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.optimizer.Adam.apply_with_lr" title="Permalink to this definition">¶</a></dt> <dd><p>Update one parameter object.</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><p><strong>step</strong> (<em>int</em>) â the accumulated training iterations, not the iteration ID</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">Parameters:</th><td class="field-body"><strong>step</strong> (<em>int</em>) â the accumulated training iterations, not the iteration ID</td> +</tr> +</tbody> +</table> </dd></dl> </dd></dl> @@ -531,11 +579,14 @@ updating rules (including regularizer an <em class="property">class </em><code class="descclassname">singa.optimizer.</code><code class="descname">CppRegularizer</code><span class="sig-paren">(</span><em>conf</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.optimizer.CppRegularizer" title="Permalink to this definition">¶</a></dt> <dd><p>Bases: <a class="reference internal" href="#singa.optimizer.Regularizer" title="singa.optimizer.Regularizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">singa.optimizer.Regularizer</span></code></a></p> <p>Wrapper for regularizer implemented using C++.</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><p><strong>conf</strong> (<em>RegularizerConf</em>) â protobuf message for the configuration.</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">Parameters:</th><td class="field-body"><strong>conf</strong> (<em>RegularizerConf</em>) â protobuf message for the configuration.</td> +</tr> +</tbody> +</table> <dl class="method"> <dt id="singa.optimizer.CppRegularizer.apply"> <code class="descname">apply</code><span class="sig-paren">(</span><em>epoch</em>, <em>value</em>, <em>grad</em>, <em>step=-1</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.optimizer.CppRegularizer.apply" title="Permalink to this definition">¶</a></dt> @@ -548,11 +599,14 @@ updating rules (including regularizer an <em class="property">class </em><code class="descclassname">singa.optimizer.</code><code class="descname">L2Regularizer</code><span class="sig-paren">(</span><em>coefficient</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.optimizer.L2Regularizer" title="Permalink to this definition">¶</a></dt> <dd><p>Bases: <a class="reference internal" href="#singa.optimizer.Regularizer" title="singa.optimizer.Regularizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">singa.optimizer.Regularizer</span></code></a></p> <p>L2 regularization</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><p><strong>coefficient</strong> (<em>float</em>) â regularization coefficient.</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">Parameters:</th><td class="field-body"><strong>coefficient</strong> (<em>float</em>) â regularization coefficient.</td> +</tr> +</tbody> +</table> <dl class="method"> <dt id="singa.optimizer.L2Regularizer.apply"> <code class="descname">apply</code><span class="sig-paren">(</span><em>epoch</em>, <em>value</em>, <em>grad</em>, <em>step=-1</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.optimizer.L2Regularizer.apply" title="Permalink to this definition">¶</a></dt> @@ -577,11 +631,14 @@ updating rules (including regularizer an <em class="property">class </em><code class="descclassname">singa.optimizer.</code><code class="descname">CppConstraint</code><span class="sig-paren">(</span><em>conf</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.optimizer.CppConstraint" title="Permalink to this definition">¶</a></dt> <dd><p>Bases: <a class="reference internal" href="#singa.optimizer.Constraint" title="singa.optimizer.Constraint"><code class="xref py py-class docutils literal notranslate"><span class="pre">singa.optimizer.Constraint</span></code></a></p> <p>Wrapper for constraints implemented using C++.</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><p><strong>conf</strong> (<em>ConstraintConf</em>) â protobuf message for the configuration.</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">Parameters:</th><td class="field-body"><strong>conf</strong> (<em>ConstraintConf</em>) â protobuf message for the configuration.</td> +</tr> +</tbody> +</table> <dl class="method"> <dt id="singa.optimizer.CppConstraint.apply"> <code class="descname">apply</code><span class="sig-paren">(</span><em>epoch</em>, <em>value</em>, <em>grad</em>, <em>step=-1</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.optimizer.CppConstraint.apply" title="Permalink to this definition">¶</a></dt> @@ -614,7 +671,7 @@ updating rules (including regularizer an <a href="autograd.html" class="btn btn-neutral float-right" title="Autograd in Singa" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> - <a href="metric.html" class="btn btn-neutral float-left" title="Metric" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> + <a href="metric.html" class="btn btn-neutral" title="Metric" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> </div> @@ -623,7 +680,7 @@ updating rules (including regularizer an <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> @@ -640,17 +697,36 @@ updating rules (including regularizer an + + + <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/security.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/security.html?rev=1862313&r1=1862312&r2=1862313&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/security.html (original) +++ incubator/singa/site/trunk/en/docs/security.html Sat Jun 29 14:42:24 2019 @@ -18,26 +18,20 @@ - <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="Download SINGA" href="../downloads.html" /> - <link rel="prev" title="Image Classification using VGG" href="model_zoo/imagenet/vgg/README.html" /> + <link rel="prev" title="Image Classification using GoogleNet" href="model_zoo/imagenet/googlenet/README.html" /> <link href="../_static/style.css" rel="stylesheet" type="text/css"> <!--link href="../_static/fontawesome-all.min.css" rel="stylesheet" type="text/css"--> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous"> @@ -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> @@ -221,7 +219,7 @@ <a href="../downloads.html" class="btn btn-neutral float-right" title="Download SINGA" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> - <a href="model_zoo/imagenet/vgg/README.html" class="btn btn-neutral float-left" title="Image Classification using VGG" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> + <a href="model_zoo/imagenet/googlenet/README.html" class="btn btn-neutral" title="Image Classification using GoogleNet" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> </div> @@ -230,7 +228,7 @@ <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> @@ -247,17 +245,36 @@ + + + <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/snapshot.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/snapshot.html?rev=1862313&r1=1862312&r2=1862313&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/snapshot.html (original) +++ incubator/singa/site/trunk/en/docs/snapshot.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> @@ -226,25 +224,32 @@ <dt id="singa.snapshot.Snapshot.read"> <code class="descname">read</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#singa.snapshot.Snapshot.read" title="Permalink to this definition">¶</a></dt> <dd><p>Call read method to load all (param_name, param_val)</p> -<dl class="field-list simple"> -<dt class="field-odd">Returns</dt> -<dd class="field-odd"><p>a dict of (parameter name, parameter Tensor)</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 dict of (parameter name, parameter Tensor)</td> +</tr> +</tbody> +</table> </dd></dl> <dl class="method"> <dt id="singa.snapshot.Snapshot.write"> <code class="descname">write</code><span class="sig-paren">(</span><em>param_name</em>, <em>param_val</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.snapshot.Snapshot.write" title="Permalink to this definition">¶</a></dt> <dd><p>Call Write method to write a parameter</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><ul class="simple"> -<li><p><strong>param_name</strong> (<em>string</em>) â name of the parameter</p></li> -<li><p><strong>param_val</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â value tensor of the parameter</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 last simple"> +<li><strong>param_name</strong> (<em>string</em>) â name of the parameter</li> +<li><strong>param_val</strong> (<a class="reference internal" href="tensor.html#singa.tensor.Tensor" title="singa.tensor.Tensor"><em>Tensor</em></a>) â value tensor of the parameter</li> </ul> -</dd> -</dl> +</td> +</tr> +</tbody> +</table> </dd></dl> </dd></dl> @@ -262,7 +267,7 @@ <a href="converter.html" class="btn btn-neutral float-right" title="Caffe Converter" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> - <a href="image_tool.html" class="btn btn-neutral float-left" title="Image Tool" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> + <a href="image_tool.html" class="btn btn-neutral" title="Image Tool" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> </div> @@ -271,7 +276,7 @@ <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> @@ -288,17 +293,36 @@ + + + <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>
