Modified: incubator/singa/site/trunk/en/docs/autograd.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/autograd.html?rev=1862313&r1=1862312&r2=1862313&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/autograd.html (original) +++ incubator/singa/site/trunk/en/docs/autograd.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> @@ -224,53 +222,54 @@ 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="autograd-in-singa"> -<h1>Autograd in Singa<a class="headerlink" href="#autograd-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="autograd-in-singa"> +<span id="autograd-in-singa"></span><h1>Autograd in Singa<a class="headerlink" href="#autograd-in-singa" title="Permalink to this headline">¶</a></h1> <p>There are two typical ways to implement autograd, via symbolic differentiation like <a class="reference external" href="http://deeplearning.net/software/theano/index.html">Theano</a> or reverse differentiation like <a class="reference external" href="https://pytorch.org/docs/stable/notes/autograd.html">Pytorch</a>. Singa follows Pytorch way, which records the computation graph and apply the backward propagation automatically after forward propagation. The autograd algorithm is explained in details <a class="reference external" href="https://pytorch.org/docs/stable/notes/autograd.html">here</a>. We explain the relevant modules in Singa and give an example to illustrate the usage.</p> <div class="section" id="relevant-modules"> -<h2>Relevant Modules<a class="headerlink" href="#relevant-modules" title="Permalink to this headline">¶</a></h2> +<span id="relevant-modules"></span><h2>Relevant Modules<a class="headerlink" href="#relevant-modules" title="Permalink to this headline">¶</a></h2> <p>There are three classes involved in autograd, namely <code class="docutils literal notranslate"><span class="pre">singa.tensor.Tensor</span></code> , <code class="docutils literal notranslate"><span class="pre">singa.autograd.Operation</span></code>, and <code class="docutils literal notranslate"><span class="pre">singa.autograd.Layer</span></code>. In the rest of this article, we use tensor, operation and layer to refer to an instance of the respective class.</p> <div class="section" id="tensor"> -<h3>Tensor<a class="headerlink" href="#tensor" title="Permalink to this headline">¶</a></h3> +<span id="tensor"></span><h3>Tensor<a class="headerlink" href="#tensor" title="Permalink to this headline">¶</a></h3> <p>Three attributes of Tensor are used by autograd,</p> <ul class="simple"> -<li><p><code class="docutils literal notranslate"><span class="pre">.creator</span></code> is an <code class="docutils literal notranslate"><span class="pre">Operation</span></code> instance. It records the operation that generates the Tensor instance.</p></li> -<li><p><code class="docutils literal notranslate"><span class="pre">.requires_grad</span></code> is a boolean variable. It is used to indicate that the autograd algorithm needs to compute the gradient of the tensor (i.e., the owner). For example, during backpropagation, the gradients of the tensors for the weight matrix of a linear layer and the feature maps of a convolution layer (not the bottom layer) should be computed.</p></li> -<li><p><code class="docutils literal notranslate"><span class="pre">.stores_grad</span></code> is a boolean variable. It is used to indicate that the gradient of the owner tensor should be stored and output by the backward function. For example, the gradient of the feature maps is computed during backpropagation, but is not included in the output of the backward function.</p></li> +<li><code class="docutils literal notranslate"><span class="pre">.creator</span></code> is an <code class="docutils literal notranslate"><span class="pre">Operation</span></code> instance. It records the operation that generates the Tensor instance.</li> +<li><code class="docutils literal notranslate"><span class="pre">.requires_grad</span></code> is a boolean variable. It is used to indicate that the autograd algorithm needs to compute the gradient of the tensor (i.e., the owner). For example, during backpropagation, the gradients of the tensors for the weight matrix of a linear layer and the feature maps of a convolution layer (not the bottom layer) should be computed.</li> +<li><code class="docutils literal notranslate"><span class="pre">.stores_grad</span></code> is a boolean variable. It is used to indicate that the gradient of the owner tensor should be stored and output by the backward function. For example, the gradient of the feature maps is computed during backpropagation, but is not included in the output of the backward function.</li> </ul> <p>Programmers can change <code class="docutils literal notranslate"><span class="pre">requires_grad</span></code> and <code class="docutils literal notranslate"><span class="pre">stores_grad</span></code> of a Tensor instance. For example, if later is set to True, the corresponding gradient is included in the output of the backward function. It should be noted that if <code class="docutils literal notranslate"><span class="pre">stores_grad</span></code> is True, then <code class="docutils literal notranslate"><span class="pre">requires_grad</span></code> must be true, not vice versa.</p> </div> <div class="section" id="operation"> -<h3>Operation<a class="headerlink" href="#operation" title="Permalink to this headline">¶</a></h3> +<span id="operation"></span><h3>Operation<a class="headerlink" href="#operation" title="Permalink to this headline">¶</a></h3> <p>It takes one or more <code class="docutils literal notranslate"><span class="pre">Tensor</span></code> instances as input, and then outputs one or more <code class="docutils literal notranslate"><span class="pre">Tensor</span></code> instances. For example, ReLU can be implemented as a specific Operation subclass. When an <code class="docutils literal notranslate"><span class="pre">Operation</span></code> instance is called (after instantiation), the following two steps are executed:</p> <ol class="simple"> -<li><p>record the source operations, i.e., the <code class="docutils literal notranslate"><span class="pre">creator</span></code>s of the input tensors. 2. do calculation by calling member function <code class="docutils literal notranslate"><span class="pre">.forward()</span></code></p></li> +<li>record the source operations, i.e., the <code class="docutils literal notranslate"><span class="pre">creator</span></code>s of the input tensors. 2. do calculation by calling member function <code class="docutils literal notranslate"><span class="pre">.forward()</span></code></li> </ol> <p>There are two member functions for forwarding and backwarding, i.e., <code class="docutils literal notranslate"><span class="pre">.forward()</span></code> and <code class="docutils literal notranslate"><span class="pre">.backward()</span></code>. They take <code class="docutils literal notranslate"><span class="pre">Tensor.data</span></code> as inputs (the type is <code class="docutils literal notranslate"><span class="pre">CTensor</span></code>), and output <code class="docutils literal notranslate"><span class="pre">Ctensor</span></code>s. To add a specific operation, subclass <code class="docutils literal notranslate"><span class="pre">operation</span></code> should implement their own <code class="docutils literal notranslate"><span class="pre">.forward()</span></code> and <code class="docutils literal notranslate"><span class="pre">.backward()</span></code>. The <code class="docutils literal notranslate"><span class="pre">backward()</span></code> function is called by the <c ode class="docutils literal notranslate"><span class="pre">backward()</span></code> function of autograd automatically during backward propogation to compute the gradients of inputs (according to the <code class="docutils literal notranslate"><span class="pre">require_grad</span></code> field).</p> </div> <div class="section" id="layer"> -<h3>Layer<a class="headerlink" href="#layer" title="Permalink to this headline">¶</a></h3> +<span id="layer"></span><h3>Layer<a class="headerlink" href="#layer" title="Permalink to this headline">¶</a></h3> <p>For those operations that require parameters, we package them into a new class, <code class="docutils literal notranslate"><span class="pre">Layer</span></code>. For example, convolution operation is wrapped into a convolution layer. <code class="docutils literal notranslate"><span class="pre">Layer</span></code> manages (stores) the parameters and calls the corresponding <code class="docutils literal notranslate"><span class="pre">Operation</span></code>s to implement the transformation.</p> </div> </div> <div class="section" id="examples"> -<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2> +<span id="examples"></span><h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2> <p>Multiple examples are provided in the <a class="reference external" href="https://github.com/apache/incubator-singa/tree/master/examples/autograd">example folder</a>. We explain two representative examples here.</p> <div class="section" id="operation-only"> -<h3>Operation only<a class="headerlink" href="#operation-only" title="Permalink to this headline">¶</a></h3> +<span id="operation-only"></span><h3>Operation only<a class="headerlink" href="#operation-only" title="Permalink to this headline">¶</a></h3> <p>The following codes implement a MLP model using only Operation instances (no Layer instances).</p> <div class="section" id="import-packages"> -<h4>Import packages<a class="headerlink" href="#import-packages" title="Permalink to this headline">¶</a></h4> +<span id="import-packages"></span><h4>Import packages<a class="headerlink" href="#import-packages" title="Permalink to this headline">¶</a></h4> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">singa.tensor</span> <span class="k">import</span> <span class="n">Tensor</span> <span class="kn">from</span> <span class="nn">singa</span> <span class="k">import</span> <span class="n">autograd</span> <span class="kn">from</span> <span class="nn">singa</span> <span class="k">import</span> <span class="n">opt</span> @@ -278,7 +277,7 @@ </div> </div> <div class="section" id="create-weight-matrix-and-bias-vector"> -<h4>Create weight matrix and bias vector<a class="headerlink" href="#create-weight-matrix-and-bias-vector" title="Permalink to this headline">¶</a></h4> +<span id="create-weight-matrix-and-bias-vector"></span><h4>Create weight matrix and bias vector<a class="headerlink" href="#create-weight-matrix-and-bias-vector" title="Permalink to this headline">¶</a></h4> <p>The parameter tensors are created with both <code class="docutils literal notranslate"><span class="pre">requires_grad</span></code> and <code class="docutils literal notranslate"><span class="pre">stores_grad</span></code> set to True.</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">w0</span> <span class="o">=</span> <span class="n">Tensor</span><span class="p">(</span><span class="n">shape</span><span class="o">=</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">),</span> <span class="n">requires_grad</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">stores_grad</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> <span class="n">w0</span><span class="o">.</span><span class="n">gaussian</span><span class="p">(</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.1</span><span class="p">)</span> @@ -293,7 +292,7 @@ </div> </div> <div class="section" id="training"> -<h4>Training<a class="headerlink" href="#training" title="Permalink to this headline">¶</a></h4> +<span id="training"></span><h4>Training<a class="headerlink" href="#training" title="Permalink to this headline">¶</a></h4> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">inputs</span> <span class="o">=</span> <span class="n">Tensor</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">data</span><span class="p">)</span> <span class="c1"># data matrix</span> <span class="n">target</span> <span class="o">=</span> <span class="n">Tensor</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">label</span><span class="p">)</span> <span class="c1"># label vector</span> <span class="n">autograd</span><span class="o">.</span><span class="n">training</span> <span class="o">=</span> <span class="kc">True</span> <span class="c1"># for training</span> @@ -316,10 +315,10 @@ </div> </div> <div class="section" id="operation-layer"> -<h3>Operation + Layer<a class="headerlink" href="#operation-layer" title="Permalink to this headline">¶</a></h3> +<span id="operation-layer"></span><h3>Operation + Layer<a class="headerlink" href="#operation-layer" title="Permalink to this headline">¶</a></h3> <p>The following <a class="reference external" href="https://github.com/apache/incubator-singa/blob/master/examples/autograd/mnist_cnn.py">example</a> implements a CNN model using layers provided by the autograd module.</p> <div class="section" id="create-the-layers"> -<h4>Create the layers<a class="headerlink" href="#create-the-layers" title="Permalink to this headline">¶</a></h4> +<span id="create-the-layers"></span><h4>Create the layers<a class="headerlink" href="#create-the-layers" title="Permalink to this headline">¶</a></h4> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">conv1</span> <span class="o">=</span> <span class="n">autograd</span><span class="o">.</span><span class="n">Conv2d</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">32</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="n">padding</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">bias</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span> <span class="n">bn1</span> <span class="o">=</span> <span class="n">autograd</span><span class="o">.</span><span class="n">BatchNorm2d</span><span class="p">(</span><span class="mi">32</span><span class="p">)</span> <span class="n">pooling1</span> <span class="o">=</span> <span class="n">autograd</span><span class="o">.</span><span class="n">MaxPool2d</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="n">padding</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span> @@ -332,7 +331,7 @@ </div> </div> <div class="section" id="define-the-forward-function"> -<h4>Define the forward function<a class="headerlink" href="#define-the-forward-function" title="Permalink to this headline">¶</a></h4> +<span id="define-the-forward-function"></span><h4>Define the forward function<a class="headerlink" href="#define-the-forward-function" title="Permalink to this headline">¶</a></h4> <p>The operations in the forward pass will be recorded automatically for backward propagation.</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">forward</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">t</span><span class="p">):</span> <span class="c1"># x is the input data (a batch of images)</span> @@ -357,8 +356,8 @@ </pre></div> </div> </div> -<div class="section" id="id1"> -<h4>Training<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h4> +<div class="section" id="training"> +<span id="id1"></span><h4>Training<a class="headerlink" href="#training" title="Permalink to this headline">¶</a></h4> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">autograd</span><span class="o">.</span><span class="n">training</span> <span class="o">=</span> <span class="kc">True</span> <span class="k">for</span> <span class="n">epoch</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">epochs</span><span class="p">):</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">batch_number</span><span class="p">):</span> @@ -389,7 +388,7 @@ <a href="data.html" class="btn btn-neutral float-right" title="Data" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> - <a href="optimizer.html" class="btn btn-neutral float-left" title="Optimizer" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> + <a href="optimizer.html" class="btn btn-neutral" title="Optimizer" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> </div> @@ -398,7 +397,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> @@ -415,17 +414,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/cnn.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/cnn.html?rev=1862313&r1=1862312&r2=1862313&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/cnn.html (original) +++ incubator/singa/site/trunk/en/docs/cnn.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,21 +185,22 @@ 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="quickstart-cifar10-example"> -<h1>Quickstart - Cifar10 example<a class="headerlink" href="#quickstart-cifar10-example" 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 classification. In this example, we will use a deep CNN model to do image classification for the <a class="reference external" href="http://www.cs.toronto.edu/%7Ekriz/cifar.html">CIFAR10 dataset</a>.</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>â></p> +<div class="section" id="quickstart-cifar10-example"> +<span id="quickstart-cifar10-example"></span><h1>Quickstart - Cifar10 example<a class="headerlink" href="#quickstart-cifar10-example" 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 classification. In this example, we will use a deep CNN model to do image classification for the <a class="reference external" href="http://www.cs.toronto.edu/~kriz/cifar.html">CIFAR10 dataset</a>.</p> <div class="section" id="running-instructions-for-cpp-version"> -<h2>Running instructions for CPP version<a class="headerlink" href="#running-instructions-for-cpp-version" title="Permalink to this headline">¶</a></h2> +<span id="running-instructions-for-cpp-version"></span><h2>Running instructions for CPP version<a class="headerlink" href="#running-instructions-for-cpp-version" title="Permalink to this headline">¶</a></h2> <p>Please refer to <a class="reference external" href="installation.html">Installation</a> page for how to install SINGA. Currently, we CNN requires CUDNN, hence both CUDA and CUDNN should be installed and SINGA should be compiled with CUDA and CUDNN.</p> <p>The Cifar10 dataset could be downloaded by running</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span># switch to cifar10 directory @@ -266,7 +266,7 @@ $ ./run.sh <p>The training details are stored in <code class="docutils literal notranslate"><span class="pre">train_perf</span></code> file in the same directory and the validation details in <code class="docutils literal notranslate"><span class="pre">val_perf</span></code> file.</p> </div> <div class="section" id="running-instructions-for-python-version"> -<h2>Running instructions for Python version<a class="headerlink" href="#running-instructions-for-python-version" title="Permalink to this headline">¶</a></h2> +<span id="running-instructions-for-python-version"></span><h2>Running instructions for Python version<a class="headerlink" href="#running-instructions-for-python-version" title="Permalink to this headline">¶</a></h2> <p>To run CNN example in Python version, we need to compile SINGA with Python binding,</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ mkdir build && cd build $ cmake -DUSE_PYTHON=ON .. @@ -351,7 +351,7 @@ $ python download_data.py py <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> @@ -368,17 +368,36 @@ $ python download_data.py py + + + <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/converter.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/converter.html?rev=1862313&r1=1862312&r2=1862313&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/converter.html (original) +++ incubator/singa/site/trunk/en/docs/converter.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> @@ -219,7 +217,7 @@ <a href="utils.html" class="btn btn-neutral float-right" title="Utils" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> - <a href="snapshot.html" class="btn btn-neutral float-left" title="Snapshot" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> + <a href="snapshot.html" class="btn btn-neutral" title="Snapshot" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> </div> @@ -228,7 +226,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> @@ -245,17 +243,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/data.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/data.html?rev=1862313&r1=1862312&r2=1862313&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/data.html (original) +++ incubator/singa/site/trunk/en/docs/data.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> @@ -240,28 +238,32 @@ <dt id="singa.data.ImageBatchIter"> <em class="property">class </em><code class="descclassname">singa.data.</code><code class="descname">ImageBatchIter</code><span class="sig-paren">(</span><em>img_list_file</em>, <em>batch_size</em>, <em>image_transform</em>, <em>shuffle=True</em>, <em>delimiter=' '</em>, <em>image_folder=None</em>, <em>capacity=10</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.data.ImageBatchIter" title="Permalink to this definition">¶</a></dt> <dd><p>Utility for iterating over an image dataset to get mini-batches.</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><ul class="simple"> -<li><p><strong>img_list_file</strong> (<em>str</em>) â name of the file containing image meta data; each +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>img_list_file</strong> (<em>str</em>) â name of the file containing image meta data; each line consists of image_path_suffix delimiter meta_info, where meta info could be label index or label strings, etc. meta_info should not contain the delimiter. If the meta_info of each image is just the label index, then we will parse the label index into a numpy array with length=batchsize (for compatibility); otherwise, we return a list of meta_info; -if meta info is available, we return a list of None.</p></li> -<li><p><strong>batch_size</strong> (<em>int</em>) â num of samples in one mini-batch</p></li> -<li><p><strong>image_transform</strong> â a function for image augmentation; it accepts the full -image path and outputs a list of augmented images.</p></li> -<li><p><strong>shuffle</strong> (<em>boolean</em>) â True for shuffling images in the list</p></li> -<li><p><strong>delimiter</strong> (<em>char</em>) â delimiter between image_path_suffix and label, e.g., -space or comma</p></li> -<li><p><strong>image_folder</strong> (<em>boolean</em>) â prefix of the image path</p></li> -<li><p><strong>capacity</strong> (<em>int</em>) â the max num of mini-batches in the internal queue.</p></li> +if meta info is available, we return a list of None.</li> +<li><strong>batch_size</strong> (<em>int</em>) â num of samples in one mini-batch</li> +<li><strong>image_transform</strong> â a function for image augmentation; it accepts the full +image path and outputs a list of augmented images.</li> +<li><strong>shuffle</strong> (<em>boolean</em>) â True for shuffling images in the list</li> +<li><strong>delimiter</strong> (<em>char</em>) â delimiter between image_path_suffix and label, e.g., +space or comma</li> +<li><strong>image_folder</strong> (<em>boolean</em>) â prefix of the image path</li> +<li><strong>capacity</strong> (<em>int</em>) â the max num of mini-batches in the internal queue.</li> </ul> -</dd> -</dl> +</td> +</tr> +</tbody> +</table> </dd></dl> </div> @@ -277,7 +279,7 @@ space or comma</p></li> <a href="image_tool.html" class="btn btn-neutral float-right" title="Image Tool" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> - <a href="autograd.html" class="btn btn-neutral float-left" title="Autograd in Singa" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> + <a href="autograd.html" class="btn btn-neutral" title="Autograd in Singa" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> </div> @@ -286,7 +288,7 @@ space or comma</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> @@ -303,17 +305,36 @@ space or comma</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/dependencies.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/dependencies.html?rev=1862313&r1=1862312&r2=1862313&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/dependencies.html (original) +++ incubator/singa/site/trunk/en/docs/dependencies.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,20 +185,21 @@ 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="dependent-library-installation"> -<h1>Dependent library installation<a class="headerlink" href="#dependent-library-installation" 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="dependent-library-installation"> +<span id="dependent-library-installation"></span><h1>Dependent library installation<a class="headerlink" href="#dependent-library-installation" title="Permalink to this headline">¶</a></h1> <div class="section" id="windows"> -<h2>Windows<a class="headerlink" href="#windows" title="Permalink to this headline">¶</a></h2> +<span id="windows"></span><h2>Windows<a class="headerlink" href="#windows" title="Permalink to this headline">¶</a></h2> <p>This section is used to compile and install the dependent libraries under windows system from source codes. The following instructions ONLY work for Visual Studio 2015 as previous VS does not support <a class="reference external" href="https://msdn.microsoft.com/en-us/library/hh567368.aspx">C++11 features</a> well (including generic lambdas, auto, non-static @@ -209,7 +209,7 @@ VS projects for the dependent libraries may get system-specific warnings/errors. Please fix them according to the prompts by VS.</p> <div class="section" id="google-logging"> -<h3>Google Logging<a class="headerlink" href="#google-logging" title="Permalink to this headline">¶</a></h3> +<span id="google-logging"></span><h3>Google Logging<a class="headerlink" href="#google-logging" title="Permalink to this headline">¶</a></h3> <p>The glog library is an optional library for singa project. But it is currently necessary for Window compilation. Since the latest release version of glog will encounter error C2084 on sprintf function under VS2015, we test the compilation and installation using the master branch from <a class="reference external" href="https://github.com/google/glog">github</a>.</p> @@ -224,7 +224,7 @@ system folder).</p> <p>Step 4: Done.</p> </div> <div class="section" id="google-protobuf"> -<h3>Google protobuf<a class="headerlink" href="#google-protobuf" title="Permalink to this headline">¶</a></h3> +<span id="google-protobuf"></span><h3>Google protobuf<a class="headerlink" href="#google-protobuf" title="Permalink to this headline">¶</a></h3> <p>Tested on version 2.6.1:</p> <p>Step 1: Download and decompress the source code.</p> <p>Step 2: Open âprotobuf.slnâ file under âvsprojectsâ folder. You will get a conversion @@ -241,7 +241,7 @@ installation include folder (or system f <p>Step 5: Done.</p> </div> <div class="section" id="cblas"> -<h3>CBLAS<a class="headerlink" href="#cblas" title="Permalink to this headline">¶</a></h3> +<span id="cblas"></span><h3>CBLAS<a class="headerlink" href="#cblas" title="Permalink to this headline">¶</a></h3> <p>There are ready-to-use binary packages online (<a class="reference external" href="https://sourceforge.net/projects/openblas/files/">link</a>). However, we still install OpenBLAS with version 0.2.18 as test:</p> @@ -262,12 +262,12 @@ folders).</p> </div> </div> <div class="section" id="faq"> -<h2>FAQ<a class="headerlink" href="#faq" title="Permalink to this headline">¶</a></h2> +<span id="faq"></span><h2>FAQ<a class="headerlink" href="#faq" title="Permalink to this headline">¶</a></h2> <ol> -<li><p>Error C2375 âsnprintfâ: redefinition; different linkage</p> +<li><p class="first">Error C2375 âsnprintfâ: redefinition; different linkage</p> <p>Add âHAVE_SNPRINTFâ to âC/C++ - Preprocessor - Preprocessor definitionsâ</p> </li> -<li><p>Error due to hash map</p> +<li><p class="first">Error due to hash map</p> <p>Add â_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGSâ to Preprocessor Definitions.</p> </li> </ol> @@ -285,7 +285,7 @@ folders).</p> <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> @@ -302,17 +302,36 @@ folders).</p> + + + <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/device.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/device.html?rev=1862313&r1=1862312&r2=1862313&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/device.html (original) +++ incubator/singa/site/trunk/en/docs/device.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="Tensor" href="tensor.html" /> - <link rel="prev" title="Benchmark for Distributed training" href="benchmark.html" /> + <link rel="prev" title="Software Stack" href="software_stack.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 current"><a class="current reference internal" href="#">Device</a><ul> <li class="toctree-l3"><a class="reference internal" href="#specific-devices">Specific devices</a></li> <li class="toctree-l3"><a class="reference internal" href="#module-singa.device">Python API</a></li> @@ -219,9 +217,9 @@ of memory and execution are implemented <h2>Specific devices<a class="headerlink" href="#specific-devices" title="Permalink to this headline">¶</a></h2> <p>Currently, SINGA has three Device implmentations,</p> <ol class="arabic simple"> -<li><p>CudaGPU for an Nvidia GPU card which runs Cuda code</p></li> -<li><p>CppCPU for a CPU which runs Cpp code</p></li> -<li><p>OpenclGPU for a GPU card which runs OpenCL code</p></li> +<li>CudaGPU for an Nvidia GPU card which runs Cuda code</li> +<li>CppCPU for a CPU which runs Cpp code</li> +<li>OpenclGPU for a GPU card which runs OpenCL code</li> </ol> </div> <div class="section" id="module-singa.device"> @@ -233,28 +231,32 @@ to call singa::Device and its methods.</ <dt id="singa.device.create_cuda_gpus"> <code class="descclassname">singa.device.</code><code class="descname">create_cuda_gpus</code><span class="sig-paren">(</span><em>num</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.device.create_cuda_gpus" title="Permalink to this definition">¶</a></dt> <dd><p>Create a list of CudaGPU devices.</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><p><strong>num</strong> (<em>int</em>) â number of device to create.</p> -</dd> -<dt class="field-even">Returns</dt> -<dd class="field-even"><p>a list of swig converted CudaGPU devices.</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>num</strong> (<em>int</em>) â number of device to create.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">a list of swig converted CudaGPU devices.</td> +</tr> +</tbody> +</table> </dd></dl> <dl class="function"> <dt id="singa.device.create_cuda_gpus_on"> <code class="descclassname">singa.device.</code><code class="descname">create_cuda_gpus_on</code><span class="sig-paren">(</span><em>device_ids</em><span class="sig-paren">)</span><a class="headerlink" href="#singa.device.create_cuda_gpus_on" title="Permalink to this definition">¶</a></dt> <dd><p>Create a list of CudaGPU devices.</p> -<dl class="field-list simple"> -<dt class="field-odd">Parameters</dt> -<dd class="field-odd"><p><strong>device_ids</strong> (<em>list</em>) â a list of GPU card IDs.</p> -</dd> -<dt class="field-even">Returns</dt> -<dd class="field-even"><p>a list of swig converted CudaGPU devices.</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>device_ids</strong> (<em>list</em>) â a list of GPU card IDs.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">a list of swig converted CudaGPU devices.</td> +</tr> +</tbody> +</table> </dd></dl> <dl class="function"> @@ -288,7 +290,7 @@ to call singa::Device and its methods.</ <a href="tensor.html" class="btn btn-neutral float-right" title="Tensor" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> - <a href="benchmark.html" class="btn btn-neutral float-left" title="Benchmark for Distributed training" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> + <a href="software_stack.html" class="btn btn-neutral" title="Software Stack" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> </div> @@ -297,7 +299,7 @@ to call singa::Device and its methods.</ <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> @@ -314,17 +316,36 @@ to call singa::Device and its methods.</ + + + <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/docker.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/docker.html?rev=1862313&r1=1862312&r2=1862313&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/docker.html (original) +++ incubator/singa/site/trunk/en/docs/docker.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,27 +185,28 @@ 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="docker-images"> -<h1>Docker Images<a class="headerlink" href="#docker-images" 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="docker-images"> +<span id="docker-images"></span><h1>Docker Images<a class="headerlink" href="#docker-images" title="Permalink to this headline">¶</a></h1> <div class="section" id="available-tags"> -<h2>Available tags<a class="headerlink" href="#available-tags" title="Permalink to this headline">¶</a></h2> +<span id="available-tags"></span><h2>Available tags<a class="headerlink" href="#available-tags" title="Permalink to this headline">¶</a></h2> <ul class="simple"> -<li><p><code class="docutils literal notranslate"><span class="pre">devel</span></code>, with SINGA and the development packages installed on Ubuntu16.04 (no GPU)</p></li> -<li><p><code class="docutils literal notranslate"><span class="pre">devel-cuda</span></code>, with SINGA, CUDA8.0, CUDNN5, and other development packages installed on Ubuntu16.04</p></li> +<li><code class="docutils literal notranslate"><span class="pre">devel</span></code>, with SINGA and the development packages installed on Ubuntu16.04 (no GPU)</li> +<li><code class="docutils literal notranslate"><span class="pre">devel-cuda</span></code>, with SINGA, CUDA8.0, CUDNN5, and other development packages installed on Ubuntu16.04</li> </ul> </div> <div class="section" id="use-the-existing-docker-images"> -<h2>Use the existing Docker images<a class="headerlink" href="#use-the-existing-docker-images" title="Permalink to this headline">¶</a></h2> +<span id="use-the-existing-docker-images"></span><h2>Use the existing Docker images<a class="headerlink" href="#use-the-existing-docker-images" title="Permalink to this headline">¶</a></h2> <p>Users can pull the Docker images from Dockerhub via</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">docker</span> <span class="n">pull</span> <span class="n">apache</span><span class="o">/</span><span class="n">singa</span><span class="p">:</span><span class="n">devel</span> <span class="c1"># or</span> @@ -222,7 +222,7 @@ <p>The latest SINGA code is under the <code class="docutils literal notranslate"><span class="pre">incubator-singa</span></code> folder.</p> </div> <div class="section" id="create-new-docker-images-from-dockerfile"> -<h2>Create new Docker images from Dockerfile<a class="headerlink" href="#create-new-docker-images-from-dockerfile" title="Permalink to this headline">¶</a></h2> +<span id="create-new-docker-images-from-dockerfile"></span><h2>Create new Docker images from Dockerfile<a class="headerlink" href="#create-new-docker-images-from-dockerfile" title="Permalink to this headline">¶</a></h2> <p>New Docker images could be created by executing the following command within the Dockerfile folder, e.g., tool/docker/devel/</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">docker</span> <span class="n">build</span> <span class="o">-</span><span class="n">t</span> <span class="n">singa</span><span class="p">:</span><span class="o"><</span><span class="n">TAG</span><span class="o">></span> <span class="o">-</span><span class="n">f</span> <span class="n">Dockerfile</span> @@ -233,9 +233,9 @@ Dockerfile folder, e.g., tool/docker/dev </pre></div> </div> <ul class="simple"> -<li><p>devel: development images with all dependent libsâ header files installed and SINGAâs source code; runtime: the minimal images which can run SINGA programs.</p></li> -<li><p>CUDA: cuda10.0, cuda9.0</p></li> -<li><p>CUDNN: cudnn7</p></li> +<li>devel: development images with all dependent libsâ header files installed and SINGAâs source code; runtime: the minimal images which can run SINGA programs.</li> +<li>CUDA: cuda10.0, cuda9.0</li> +<li>CUDNN: cudnn7</li> </ul> <p>Here are some example tags:</p> <p><code class="docutils literal notranslate"><span class="pre">devel-cuda9-cudnn7</span></code>, <code class="docutils literal notranslate"><span class="pre">devel-cuda9-cudnn7</span></code>, <code class="docutils literal notranslate"><span class="pre">devel-cuda10-cudnn7</span></code>, <code class="docutils literal notranslate"><span class="pre">devel-cpu</span></code>, <code class="docutils literal notranslate"><span class="pre">runtime-gpu</span></code> and <code class="docutils literal notranslate"><span class="pre">runtime-cpu</span></code></p> @@ -261,7 +261,7 @@ The folder structure is like</p> <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> @@ -278,17 +278,36 @@ The folder structure is like</p> + + + <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>
