singa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wang...@apache.org
Subject svn commit: r1833193 [15/17] - in /incubator/singa/site/trunk: en/ en/_sources/ en/_sources/develop/ en/_sources/docs/ en/_sources/docs/model_zoo/examples/imagenet/densenet/ en/_sources/docs/model_zoo/examples/imagenet/vgg/ en/_sources/releases/ en/com...
Date Fri, 08 Jun 2018 15:29:02 GMT
Added: incubator/singa/site/trunk/zh/docs/optimizer.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/zh/docs/optimizer.html?rev=1833193&view=auto
==============================================================================
--- incubator/singa/site/trunk/zh/docs/optimizer.html (added)
+++ incubator/singa/site/trunk/zh/docs/optimizer.html Fri Jun  8 15:29:00 2018
@@ -0,0 +1,586 @@
+
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>优化器(Optimizer) &mdash; incubator-singa 1.1.0 documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  
+    <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" />
+    <link rel="next" title="数据(Data)" href="data.html" />
+    <link rel="prev" title="度量(Metric)" href="metric.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">
+    <style>
+	.fa:hover {
+	    opacity: 0.7;
+	}
+	.fab:hover {
+	    opacity: 0.7;
+	}
+    </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">
+          
+
+          
+            <a href="../index.html" class="icon icon-home"> incubator-singa
+          
+
+          
+            
+            <img src="../_static/singa.png" class="logo" alt="Logo"/>
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                latest
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="../downloads.html">下载 SINGA</a></li>
+<li class="toctree-l1 current"><a class="reference internal" href="index.html">文档</a><ul class="current">
+<li class="toctree-l2"><a class="reference internal" href="installation.html">安装</a></li>
+<li class="toctree-l2"><a class="reference internal" href="software_stack.html">软件架构</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>
+<li class="toctree-l2"><a class="reference internal" href="net.html">前馈网络</a></li>
+<li class="toctree-l2"><a class="reference internal" href="initializer.html">初始化器(Initializer)</a></li>
+<li class="toctree-l2"><a class="reference internal" href="loss.html">损失(Loss)</a></li>
+<li class="toctree-l2"><a class="reference internal" href="metric.html">度量(Metric)</a></li>
+<li class="toctree-l2 current"><a class="current reference internal" href="#">优化器(Optimizer)</a><ul>
+<li class="toctree-l3"><a class="reference internal" href="#class-singa-optimizer-optimizer-lr-none-momentum-none-weight-decay-none-regularizer-none-constraint-none">class singa.optimizer.Optimizer(lr=None, momentum=None, weight_decay=None, regularizer=None, constraint=None)</a><ul>
+<li class="toctree-l4"><a class="reference internal" href="#register-name-specs">register(name, specs)</a></li>
+<li class="toctree-l4"><a class="reference internal" href="#apply-regularizer-constraint-epoch-value-grad-name-none-step-1">apply_regularizer_constraint(epoch, value, grad, name=None, step=-1)</a></li>
+<li class="toctree-l4"><a class="reference internal" href="#apply-with-lr-epoch-lr-grad-value-name-none-step-1">apply_with_lr(epoch, lr, grad, value, name=None, step=-1)</a></li>
+<li class="toctree-l4"><a class="reference internal" href="#apply-epoch-grad-value-name-none-step-1">apply(epoch, grad, value, name=None, step=-1)</a></li>
+</ul>
+</li>
+<li class="toctree-l3"><a class="reference internal" href="#class-singa-optimizer-sgd-lr-none-momentum-none-weight-decay-none-regularizer-none-constraint-none">class singa.optimizer.SGD(lr=None, momentum=None, weight_decay=None, regularizer=None, constraint=None)</a><ul>
+<li class="toctree-l4"><a class="reference internal" href="#apply-with-lr-epoch-lr-grad-value-name-step-1">apply_with_lr(epoch, lr, grad, value, name, step=-1)</a></li>
+</ul>
+</li>
+<li class="toctree-l3"><a class="reference internal" href="#class-singa-optimizer-nesterov-lr-none-momentum-0-9-weight-decay-none-regularizer-none-constraint-none">class singa.optimizer.Nesterov(lr=None, momentum=0.9, weight_decay=None, regularizer=None, constraint=None)</a><ul>
+<li class="toctree-l4"><a class="reference internal" href="#apply-with-lr-epoch-lr-grad-value-name-step-1">apply_with_lr(epoch, lr, grad, value, name, step=-1)</a></li>
+</ul>
+</li>
+<li class="toctree-l3"><a class="reference internal" href="#class-singa-optimizer-rmsprop-rho-0-9-epsilon-1e-08-lr-none-weight-decay-none-regularizer-none-constraint-none">class singa.optimizer.RMSProp(rho=0.9, epsilon=1e-08, lr=None, weight_decay=None, regularizer=None, constraint=None)</a><ul>
+<li class="toctree-l4"><a class="reference internal" href="#apply-with-lr-epoch-lr-grad-value-name-step-1">apply_with_lr(epoch, lr, grad, value, name, step=-1)</a></li>
+</ul>
+</li>
+<li class="toctree-l3"><a class="reference internal" href="#class-singa-optimizer-adagrad-epsilon-1e-08-lr-none-weight-decay-none-lr-gen-none-regularizer-none-constraint-none">class singa.optimizer.AdaGrad(epsilon=1e-08, lr=None, weight_decay=None, lr_gen=None, regularizer=None, constraint=None)</a><ul>
+<li class="toctree-l4"><a class="reference internal" href="#apply-with-lr-epoch-lr-grad-value-name-step-1">apply_with_lr(epoch, lr, grad, value, name, step=-1)</a></li>
+</ul>
+</li>
+<li class="toctree-l3"><a class="reference internal" href="#class-singa-optimizer-adam-beta-1-0-9-beta-2-0-999-epsilon-1e-08-lr-none-weight-decay-none-regularizer-none-constraint-none">class singa.optimizer.Adam(beta_1=0.9, beta_2=0.999, epsilon=1e-08, lr=None, weight_decay=None, regularizer=None, constraint=None)</a><ul>
+<li class="toctree-l4"><a class="reference internal" href="#apply-with-lr-epoch-lr-grad-value-name-step-1">apply_with_lr(epoch, lr, grad, value, name, step=-1)</a></li>
+</ul>
+</li>
+<li class="toctree-l3"><a class="reference internal" href="#class-singa-optimizer-regularizer">class singa.optimizer.Regularizer</a><ul>
+<li class="toctree-l4"><a class="reference internal" href="#apply-epoch-value-grad-step-1">apply(epoch, value, grad, step=-1)</a></li>
+</ul>
+</li>
+<li class="toctree-l3"><a class="reference internal" href="#class-singa-optimizer-cppregularizer-conf">class singa.optimizer.CppRegularizer(conf)</a><ul>
+<li class="toctree-l4"><a class="reference internal" href="#apply-epoch-value-grad-step-1">apply(epoch, value, grad, step=-1)</a></li>
+</ul>
+</li>
+<li class="toctree-l3"><a class="reference internal" href="#class-singa-optimizer-l2regularizer-coefficient">class singa.optimizer.L2Regularizer(coefficient)</a><ul>
+<li class="toctree-l4"><a class="reference internal" href="#apply-epoch-value-grad-step-1">apply(epoch, value, grad, step=-1)</a></li>
+</ul>
+</li>
+<li class="toctree-l3"><a class="reference internal" href="#class-singa-optimizer-constraint">class singa.optimizer.Constraint</a><ul>
+<li class="toctree-l4"><a class="reference internal" href="#apply-epoch-value-grad-step-1">apply(epoch, value, grad, step=-1)</a></li>
+</ul>
+</li>
+<li class="toctree-l3"><a class="reference internal" href="#class-singa-optimizer-cppconstraint-conf">class singa.optimizer.CppConstraint(conf)</a><ul>
+<li class="toctree-l4"><a class="reference internal" href="#apply-epoch-value-grad-step-1">apply(epoch, value, grad, step=-1)</a></li>
+</ul>
+</li>
+<li class="toctree-l3"><a class="reference internal" href="#class-singa-optimizer-l2constraint-threshold-none">class singa.optimizer.L2Constraint(threshold=None)</a><ul>
+<li class="toctree-l4"><a class="reference internal" href="#apply-epoch-value-grad-step-1">apply(epoch, value, grad, step=-1)</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li class="toctree-l2"><a class="reference internal" href="data.html">数据(Data)</a></li>
+<li class="toctree-l2"><a class="reference internal" href="image_tool.html">图像工具</a></li>
+<li class="toctree-l2"><a class="reference internal" href="snapshot.html">Snapshot</a></li>
+<li class="toctree-l2"><a class="reference internal" href="utils.html">Utils</a></li>
+<li class="toctree-l2"><a class="reference internal" href="model_zoo/index.html">模型库</a></li>
+</ul>
+</li>
+</ul>
+<p class="caption"><span class="caption-text">开发</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../develop/schedule.html">开发时间表</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../develop/how-contribute.html">如何贡献给 SINGA</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../develop/contribute-code.html">如何贡献代码</a></li>
+</ul>
+<p class="caption"><span class="caption-text">社区</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../community/source-repository.html">源代码库</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../community/mail-lists.html">项目邮件列表</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../community/issue-tracking.html">问题追踪</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../community/team-list.html">SINGA团队</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">incubator-singa</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="index.html">文档</a> &raquo;</li>
+        
+      <li>优化器(Optimizer)</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+            
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <div class="section" id="optimizer">
+<span id="optimizer"></span><h1>优化器(Optimizer)<a class="headerlink" href="#optimizer" title="Permalink to this headline">¶</a></h1>
+<p>这个模块包含一系列用于模型参数更新的优化器。</p>
+<p>示例用法:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">singa</span> <span class="kn">import</span> <span class="n">optimizer</span>
+<span class="kn">from</span> <span class="nn">singa</span> <span class="kn">import</span> <span class="n">tensor</span>
+
+<span class="n">sgd</span> <span class="o">=</span> <span class="n">optimizer</span><span class="o">.</span><span class="n">SGD</span><span class="p">(</span><span class="n">lr</span><span class="o">=</span><span class="mf">0.01</span><span class="p">,</span> <span class="n">momentum</span><span class="o">=</span><span class="mf">0.9</span><span class="p">,</span> <span class="n">weight_decay</span><span class="o">=</span><span class="mf">1e-4</span><span class="p">)</span>
+<span class="n">p</span> <span class="o">=</span> <span class="n">tensor</span><span class="o">.</span><span class="n">Tensor</span><span class="p">((</span><span class="mi">3</span><span class="p">,</span><span class="mi">5</span><span class="p">))</span>
+<span class="n">p</span><span class="o">.</span><span class="n">uniform</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
+<span class="n">g</span> <span class="o">=</span> <span class="n">tensor</span><span class="o">.</span><span class="n">Tensor</span><span class="p">((</span><span class="mi">3</span><span class="p">,</span><span class="mi">5</span><span class="p">))</span>
+<span class="n">g</span><span class="o">.</span><span class="n">gaussian</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mf">0.01</span><span class="p">)</span>
+
+<span class="n">sgd</span><span class="o">.</span><span class="n">apply</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="n">g</span><span class="p">,</span> <span class="n">p</span><span class="p">,</span> <span class="s1">&#39;param&#39;</span><span class="p">)</span>  <span class="c1"># use the global lr=0.1 for epoch 1</span>
+<span class="n">sgd</span><span class="o">.</span><span class="n">apply_with_lr</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mf">0.03</span><span class="p">,</span> <span class="n">g</span><span class="p">,</span> <span class="n">p</span><span class="p">,</span> <span class="s1">&#39;param&#39;</span><span class="p">)</span>  <span class="c1"># use lr=0.03 for epoch 2</span>
+</pre></div>
+</div>
+<hr class="docutils" />
+<div class="section" id="class-singa-optimizer-optimizer-lr-none-momentum-none-weight-decay-none-regularizer-none-constraint-none">
+<span id="class-singa-optimizer-optimizer-lr-none-momentum-none-weight-decay-none-regularizer-none-constraint-none"></span><h2>class singa.optimizer.Optimizer(lr=None, momentum=None, weight_decay=None, regularizer=None, constraint=None)<a class="headerlink" href="#class-singa-optimizer-optimizer-lr-none-momentum-none-weight-decay-none-regularizer-none-constraint-none" title="Permalink to this headline">¶</a></h2>
+<p>基类:<code class="docutils literal notranslate"><span class="pre">object</span></code></p>
+<p>Python优化器类的基类。
+典型地,优化器有如下作用:</p>
+<ol class="simple">
+<li>构建优化器</li>
+<li>(可选)以参数名为注册每种参数</li>
+<li>使用优化器依照给定参数梯度及其他信息更新参数值</li>
+</ol>
+<p>它的子类应该重写apply_with_lr函数已用于真实的参数更新。</p>
+<p><strong>参数:</strong></p>
+<ul class="simple">
+<li><strong>lr (float)</strong> – 学习速率</li>
+<li><strong>momentum (float)</strong> – 动量</li>
+<li><strong>weight_decay (float)</strong> – L2正则化系数,被排除于‘regularizer’之外</li>
+<li><strong>regularizer</strong> –  Regularizer或RegularizerConf实例;如被设置,正则化将被用于apply_with_lr()。 用户也可以在优化器外部做正则化。</li>
+<li><strong>constraint</strong> – Constraint或ConstraintConf实例;如被设置,正则化将被用于apply_with_lr()。 用户也可以在优化器外部做正则化。</li>
+</ul>
+<hr class="docutils" />
+<div class="section" id="register-name-specs">
+<span id="register-name-specs"></span><h3>register(name, specs)<a class="headerlink" href="#register-name-specs" title="Permalink to this headline">¶</a></h3>
+<p>注册参数,包括为每个参数对象创建正则化和约束条件。 这里参数特定的正则化和约束比全局设置有更高优先级。 如果所有参数对于学习速率、正规化器和约束条件共享相同的设置,则不需要调用该函数。</p>
+<p><strong>参数:</strong></p>
+<ul class="simple">
+<li><strong>name (str)</strong> – 参数名</li>
+<li><strong>specs (ParamSpec)</strong> – protobuf对象,包括正则化和约束条件、学习速率和权值衰减乘子。</li>
+</ul>
+</div>
+<hr class="docutils" />
+<div class="section" id="apply-regularizer-constraint-epoch-value-grad-name-none-step-1">
+<span id="apply-regularizer-constraint-epoch-value-grad-name-none-step-1"></span><h3>apply_regularizer_constraint(epoch, value, grad, name=None, step=-1)<a class="headerlink" href="#apply-regularizer-constraint-epoch-value-grad-name-none-step-1" title="Permalink to this headline">¶</a></h3>
+<p>如果可用,将采用正则化和约束条件。 如果全局正则化和参数特定的正则化都存在,会采用参数特定的正则化。</p>
+<p><strong>参数:</strong></p>
+<ul class="simple">
+<li><strong>epoch (int)</strong> – 训练的epoch ID (完整训练一遍训练数据称为一个epoch)</li>
+<li><strong>value (Tensor)</strong> – 参数Tensor</li>
+<li><strong>grad (Tensor)</strong> – 参数梯度Tensor</li>
+<li><strong>name (string)</strong> – 参数名以索引到特定的规则(正则化或约束条件)</li>
+<li><strong>step (int)</strong> – 每个epoch内的迭代ID</li>
+</ul>
+<p><strong>返回值:</strong> 更新后的梯度tensor</p>
+</div>
+<hr class="docutils" />
+<div class="section" id="apply-with-lr-epoch-lr-grad-value-name-none-step-1">
+<span id="apply-with-lr-epoch-lr-grad-value-name-none-step-1"></span><h3>apply_with_lr(epoch, lr, grad, value, name=None, step=-1)<a class="headerlink" href="#apply-with-lr-epoch-lr-grad-value-name-none-step-1" title="Permalink to this headline">¶</a></h3>
+<p>如果grad非空,则根据给定学习速率更新参数。</p>
+<p>子类优化器必须重写这个函数。如果grad为空,将不做任何操作。</p>
+<p><strong>参数:</strong></p>
+<ul class="simple">
+<li><strong>epoch (int)</strong> – 训练的epoch ID (完整训练一遍训练数据称为一个epoch)</li>
+<li><strong>lr (float)</strong> – 学习速率</li>
+<li><strong>value (Tensor)</strong> – 参数Tensor</li>
+<li><strong>grad (Tensor)</strong> – 参数梯度Tensor</li>
+<li><strong>name (string)</strong> – 参数名以索引到特定的规则(正则化或约束条件)</li>
+<li><strong>step (int)</strong> – 每个epoch内的迭代ID
+<strong>返回值:</strong> 更新后的参数值</li>
+</ul>
+</div>
+<hr class="docutils" />
+<div class="section" id="apply-epoch-grad-value-name-none-step-1">
+<span id="apply-epoch-grad-value-name-none-step-1"></span><h3>apply(epoch, grad, value, name=None, step=-1)<a class="headerlink" href="#apply-epoch-grad-value-name-none-step-1" title="Permalink to this headline">¶</a></h3>
+<p>假设学习速率生成器配置完成,完成参数更新。 子类不需要重写这个函数。</p>
+<p><strong>参数:</strong></p>
+<ul class="simple">
+<li><strong>epoch (int)</strong> – 训练的epoch ID (完整训练一遍训练数据称为一个epoch)</li>
+<li><strong>value (Tensor)</strong> – 参数Tensor</li>
+<li><strong>grad (Tensor)</strong> – 参数梯度Tensor</li>
+<li><strong>name (string)</strong> – 参数名以索引到特定的规则(正则化或约束条件)</li>
+<li><strong>step (int)</strong> – 每个epoch内的迭代ID</li>
+</ul>
+<p><strong>返回值:</strong> 更新后的参数值</p>
+</div>
+</div>
+<hr class="docutils" />
+<div class="section" id="class-singa-optimizer-sgd-lr-none-momentum-none-weight-decay-none-regularizer-none-constraint-none">
+<span id="class-singa-optimizer-sgd-lr-none-momentum-none-weight-decay-none-regularizer-none-constraint-none"></span><h2>class singa.optimizer.SGD(lr=None, momentum=None, weight_decay=None, regularizer=None, constraint=None)<a class="headerlink" href="#class-singa-optimizer-sgd-lr-none-momentum-none-weight-decay-none-regularizer-none-constraint-none" title="Permalink to this headline">¶</a></h2>
+<p>基类:<code class="docutils literal notranslate"><span class="pre">singa.optimizer.Optimizer</span></code></p>
+<p>原始的包含动量的随机梯度下降算法。 参数详见Optimizer基类。</p>
+<div class="section" id="apply-with-lr-epoch-lr-grad-value-name-step-1">
+<span id="apply-with-lr-epoch-lr-grad-value-name-step-1"></span><h3>apply_with_lr(epoch, lr, grad, value, name, step=-1)<a class="headerlink" href="#apply-with-lr-epoch-lr-grad-value-name-step-1" title="Permalink to this headline">¶</a></h3>
+</div>
+</div>
+<hr class="docutils" />
+<div class="section" id="class-singa-optimizer-nesterov-lr-none-momentum-0-9-weight-decay-none-regularizer-none-constraint-none">
+<span id="class-singa-optimizer-nesterov-lr-none-momentum-0-9-weight-decay-none-regularizer-none-constraint-none"></span><h2>class singa.optimizer.Nesterov(lr=None, momentum=0.9, weight_decay=None, regularizer=None, constraint=None)<a class="headerlink" href="#class-singa-optimizer-nesterov-lr-none-momentum-0-9-weight-decay-none-regularizer-none-constraint-none" title="Permalink to this headline">¶</a></h2>
+<p>基类:<code class="docutils literal notranslate"><span class="pre">singa.optimizer.Optimizer</span></code></p>
+<p>包含Nesterov动量的随机梯度下降算法。参数详见Optimizer基类。</p>
+<div class="section" id="apply-with-lr-epoch-lr-grad-value-name-step-1">
+<span id="id1"></span><h3>apply_with_lr(epoch, lr, grad, value, name, step=-1)<a class="headerlink" href="#apply-with-lr-epoch-lr-grad-value-name-step-1" title="Permalink to this headline">¶</a></h3>
+</div>
+</div>
+<hr class="docutils" />
+<div class="section" id="class-singa-optimizer-rmsprop-rho-0-9-epsilon-1e-08-lr-none-weight-decay-none-regularizer-none-constraint-none">
+<span id="class-singa-optimizer-rmsprop-rho-0-9-epsilon-1e-08-lr-none-weight-decay-none-regularizer-none-constraint-none"></span><h2>class singa.optimizer.RMSProp(rho=0.9, epsilon=1e-08, lr=None, weight_decay=None, regularizer=None, constraint=None)<a class="headerlink" href="#class-singa-optimizer-rmsprop-rho-0-9-epsilon-1e-08-lr-none-weight-decay-none-regularizer-none-constraint-none" title="Permalink to this headline">¶</a></h2>
+<p>基类:<code class="docutils literal notranslate"><span class="pre">singa.optimizer.Optimizer</span></code></p>
+<p>RMSProp优化器。构造器参数请参考Optimizer基类。</p>
+<p><strong>参数:</strong></p>
+<ul class="simple">
+<li><strong>rho (float)</strong> – [0, 1]间的浮点数</li>
+<li><strong>epsilon (float)</strong> – 很小的值,以避免数值误差</li>
+</ul>
+<div class="section" id="apply-with-lr-epoch-lr-grad-value-name-step-1">
+<span id="id2"></span><h3>apply_with_lr(epoch, lr, grad, value, name, step=-1)<a class="headerlink" href="#apply-with-lr-epoch-lr-grad-value-name-step-1" title="Permalink to this headline">¶</a></h3>
+</div>
+</div>
+<hr class="docutils" />
+<div class="section" id="class-singa-optimizer-adagrad-epsilon-1e-08-lr-none-weight-decay-none-lr-gen-none-regularizer-none-constraint-none">
+<span id="class-singa-optimizer-adagrad-epsilon-1e-08-lr-none-weight-decay-none-lr-gen-none-regularizer-none-constraint-none"></span><h2>class singa.optimizer.AdaGrad(epsilon=1e-08, lr=None, weight_decay=None, lr_gen=None, regularizer=None, constraint=None)<a class="headerlink" href="#class-singa-optimizer-adagrad-epsilon-1e-08-lr-none-weight-decay-none-lr-gen-none-regularizer-none-constraint-none" title="Permalink to this headline">¶</a></h2>
+<p>基类:<code class="docutils literal notranslate"><span class="pre">singa.optimizer.Optimizer</span></code></p>
+<p>AdaGrad优化器。构造器参数请参考Optimizer基类。</p>
+<p><strong>参数:</strong></p>
+<ul class="simple">
+<li><strong>epsilon (float)</strong> – 很小的值,以避免数值误差</li>
+</ul>
+<div class="section" id="apply-with-lr-epoch-lr-grad-value-name-step-1">
+<span id="id3"></span><h3>apply_with_lr(epoch, lr, grad, value, name, step=-1)<a class="headerlink" href="#apply-with-lr-epoch-lr-grad-value-name-step-1" title="Permalink to this headline">¶</a></h3>
+</div>
+</div>
+<hr class="docutils" />
+<div class="section" id="class-singa-optimizer-adam-beta-1-0-9-beta-2-0-999-epsilon-1e-08-lr-none-weight-decay-none-regularizer-none-constraint-none">
+<span id="class-singa-optimizer-adam-beta-1-0-9-beta-2-0-999-epsilon-1e-08-lr-none-weight-decay-none-regularizer-none-constraint-none"></span><h2>class singa.optimizer.Adam(beta_1=0.9, beta_2=0.999, epsilon=1e-08, lr=None, weight_decay=None, regularizer=None, constraint=None)<a class="headerlink" href="#class-singa-optimizer-adam-beta-1-0-9-beta-2-0-999-epsilon-1e-08-lr-none-weight-decay-none-regularizer-none-constraint-none" title="Permalink to this headline">¶</a></h2>
+<p>基类:<code class="docutils literal notranslate"><span class="pre">singa.optimizer.Optimizer</span></code></p>
+<p>Ada优化器。构造器参数请参考Optimizer基类。</p>
+<p><strong>参数:</strong></p>
+<ul class="simple">
+<li><strong>beta_1 (float)</strong> – 动量系数</li>
+<li><strong>beta_2 (float)</strong> – 整合的梯度平方的系数</li>
+<li><strong>epsilon (float)</strong> – 很小的值,以避免数值误差</li>
+</ul>
+<div class="section" id="apply-with-lr-epoch-lr-grad-value-name-step-1">
+<span id="id4"></span><h3>apply_with_lr(epoch, lr, grad, value, name, step=-1)<a class="headerlink" href="#apply-with-lr-epoch-lr-grad-value-name-step-1" title="Permalink to this headline">¶</a></h3>
+<p>更新一个参数对象</p>
+<p><strong>参数:</strong></p>
+<ul class="simple">
+<li><strong>step (int)</strong> – 累积训练迭代数,而不是当前迭代ID</li>
+</ul>
+</div>
+</div>
+<hr class="docutils" />
+<div class="section" id="class-singa-optimizer-regularizer">
+<span id="class-singa-optimizer-regularizer"></span><h2>class singa.optimizer.Regularizer<a class="headerlink" href="#class-singa-optimizer-regularizer" title="Permalink to this headline">¶</a></h2>
+<p>基类:<code class="docutils literal notranslate"><span class="pre">object</span></code></p>
+<p>Python参数梯度正则化的基类。</p>
+<div class="section" id="apply-epoch-value-grad-step-1">
+<span id="apply-epoch-value-grad-step-1"></span><h3>apply(epoch, value, grad, step=-1)<a class="headerlink" href="#apply-epoch-value-grad-step-1" title="Permalink to this headline">¶</a></h3>
+</div>
+</div>
+<hr class="docutils" />
+<div class="section" id="class-singa-optimizer-cppregularizer-conf">
+<span id="class-singa-optimizer-cppregularizer-conf"></span><h2>class singa.optimizer.CppRegularizer(conf)<a class="headerlink" href="#class-singa-optimizer-cppregularizer-conf" title="Permalink to this headline">¶</a></h2>
+<p>基类:<code class="docutils literal notranslate"><span class="pre">singa.optimizer.Regularizer</span></code></p>
+<p>正则化的封装使用C++实现。</p>
+<p><strong>参数:</strong></p>
+<ul class="simple">
+<li><strong>conf (RegularizerConf)</strong> – protobuf配置信息</li>
+</ul>
+<div class="section" id="apply-epoch-value-grad-step-1">
+<span id="id5"></span><h3>apply(epoch, value, grad, step=-1)<a class="headerlink" href="#apply-epoch-value-grad-step-1" title="Permalink to this headline">¶</a></h3>
+</div>
+</div>
+<hr class="docutils" />
+<div class="section" id="class-singa-optimizer-l2regularizer-coefficient">
+<span id="class-singa-optimizer-l2regularizer-coefficient"></span><h2>class singa.optimizer.L2Regularizer(coefficient)<a class="headerlink" href="#class-singa-optimizer-l2regularizer-coefficient" title="Permalink to this headline">¶</a></h2>
+<p>基类:<code class="docutils literal notranslate"><span class="pre">singa.optimizer.Regularizer</span></code></p>
+<p>L2正则化。</p>
+<p><strong>参数:</strong></p>
+<ul class="simple">
+<li><strong>coefficient (float)</strong> – 正则化系数</li>
+</ul>
+<div class="section" id="apply-epoch-value-grad-step-1">
+<span id="id6"></span><h3>apply(epoch, value, grad, step=-1)<a class="headerlink" href="#apply-epoch-value-grad-step-1" title="Permalink to this headline">¶</a></h3>
+</div>
+</div>
+<hr class="docutils" />
+<div class="section" id="class-singa-optimizer-constraint">
+<span id="class-singa-optimizer-constraint"></span><h2>class singa.optimizer.Constraint<a class="headerlink" href="#class-singa-optimizer-constraint" title="Permalink to this headline">¶</a></h2>
+<p>基类:<code class="docutils literal notranslate"><span class="pre">object</span></code></p>
+<p>Python参数梯度约束的基类。</p>
+<div class="section" id="apply-epoch-value-grad-step-1">
+<span id="id7"></span><h3>apply(epoch, value, grad, step=-1)<a class="headerlink" href="#apply-epoch-value-grad-step-1" title="Permalink to this headline">¶</a></h3>
+</div>
+</div>
+<hr class="docutils" />
+<div class="section" id="class-singa-optimizer-cppconstraint-conf">
+<span id="class-singa-optimizer-cppconstraint-conf"></span><h2>class singa.optimizer.CppConstraint(conf)<a class="headerlink" href="#class-singa-optimizer-cppconstraint-conf" title="Permalink to this headline">¶</a></h2>
+<p>基类:<code class="docutils literal notranslate"><span class="pre">singa.optimizer.Constraint</span></code></p>
+<p>约束的封装使用C++实现。</p>
+<p><strong>参数:</strong></p>
+<ul class="simple">
+<li><strong>conf (RegularizerConf)</strong> – protobuf配置信息</li>
+</ul>
+<div class="section" id="apply-epoch-value-grad-step-1">
+<span id="id8"></span><h3>apply(epoch, value, grad, step=-1)<a class="headerlink" href="#apply-epoch-value-grad-step-1" title="Permalink to this headline">¶</a></h3>
+</div>
+</div>
+<hr class="docutils" />
+<div class="section" id="class-singa-optimizer-l2constraint-threshold-none">
+<span id="class-singa-optimizer-l2constraint-threshold-none"></span><h2>class singa.optimizer.L2Constraint(threshold=None)<a class="headerlink" href="#class-singa-optimizer-l2constraint-threshold-none" title="Permalink to this headline">¶</a></h2>
+<p>基类:<code class="docutils literal notranslate"><span class="pre">singa.optimizer.Constraint</span></code></p>
+<p>梯度缩放使得L2 norm小于给定阀值。</p>
+<div class="section" id="apply-epoch-value-grad-step-1">
+<span id="id9"></span><h3>apply(epoch, value, grad, step=-1)<a class="headerlink" href="#apply-epoch-value-grad-step-1" title="Permalink to this headline">¶</a></h3>
+<hr class="docutils" />
+</div>
+</div>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <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="metric.html" class="btn btn-neutral" title="度量(Metric)" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018 The Apache Software Foundation. All rights reserved. Apache SINGA, Apache, the Apache feather logo, and the Apache SINGA project logos are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners..
+
+    </p>
+  </div>
+  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'1.1.0',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+
+  
+
+  
+  
+    <script type="text/javascript" src="../_static/js/theme.js"></script>
+  
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.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>
+    v: latest
+    <span class="fa fa-caret-down"></span>
+  </span>
+  <div class="rst-other-versions">
+      <dl>
+          <dt>Languages</dt>
+          <dd><a href="../../en/index.html">English</a></dd>
+          <dd><a href="../../zh/index.html">中文</a></dd>
+      </dl>
+      <dl>
+          <dt>Versions</dt>
+          <dd><a href="http://singa.apache.org/v0.3.0/">0.3</a></dd>
+          <dd><a href="http://singa.apache.org/v1.1.0/">1.1</a></dd>
+      </dl>
+
+  </div>
+  <a href="http://incubator.apache.org/"> <img src= "../_static/apache.png" style="background-color:white;"> </a>
+
+  <a href="https://github.com/apache/incubator-singa" class="fa fa-github" style="padding: 10px; font-size: 20px; width: 30px; text-align: center; text-decoration: none; margin: 5px 2px;"></a>
+  <a href="https://aws.amazon.com/marketplace/seller-profile?id=5bcac385-12c4-4802-aec7-351e09b77b4c" class="fab fa-aws" style="padding: 10px; font-size: 20px; width: 30px; text-align: center; text-decoration: none; margin: 5px 2px;"></a>
+  <a href="https://hub.docker.com/r/nusdbsystem/singa/" class="fab fa-docker" style="padding: 10px; font-size: 20px; width: 30px; text-align: center; text-decoration: none; margin: 5px 2px;"></a> 
+  <a href="https://www.linkedin.com/groups/13550034" class="fa fa-linkedin" style="padding: 10px; font-size: 20px; width: 30px; text-align: center; text-decoration: none; margin: 5px 2px;"></a>
+  <a href="https://twitter.com/ApacheSinga" class="fa fa-twitter" style="padding: 10px; font-size: 20px; width: 30px; text-align: center; text-decoration: none; margin: 5px 2px;"></a>
+  <a href="https://www.facebook.com/Apache-SINGA-347284219056544/" class="fa fa-facebook" style="padding: 10px; font-size: 20px; width: 30px; text-align: center; text-decoration: none; margin: 5px 2px;"></a>
+  <a href="https://www.researchgate.net/project/Apache-SINGA" class="fab fa-researchgate" style="padding: 10px; font-size: 20px; width: 30px; text-align: center; text-decoration: none; margin: 5px 2px;"></a>
+
+</div>
+
+ <a href="https://github.com/apache/incubator-singa">
+    <img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;"
+        src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png"
+        alt="Fork me on GitHub">
+</a>
+
+ 
+
+
+</body>
+</html>
\ No newline at end of file

Added: incubator/singa/site/trunk/zh/docs/snapshot.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/zh/docs/snapshot.html?rev=1833193&view=auto
==============================================================================
--- incubator/singa/site/trunk/zh/docs/snapshot.html (added)
+++ incubator/singa/site/trunk/zh/docs/snapshot.html Fri Jun  8 15:29:00 2018
@@ -0,0 +1,352 @@
+
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>Snapshot &mdash; incubator-singa 1.1.0 documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  
+    <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" />
+    <link rel="next" title="Utils" href="utils.html" />
+    <link rel="prev" title="图像工具" href="image_tool.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">
+    <style>
+	.fa:hover {
+	    opacity: 0.7;
+	}
+	.fab:hover {
+	    opacity: 0.7;
+	}
+    </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">
+          
+
+          
+            <a href="../index.html" class="icon icon-home"> incubator-singa
+          
+
+          
+            
+            <img src="../_static/singa.png" class="logo" alt="Logo"/>
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                latest
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="../downloads.html">下载 SINGA</a></li>
+<li class="toctree-l1 current"><a class="reference internal" href="index.html">文档</a><ul class="current">
+<li class="toctree-l2"><a class="reference internal" href="installation.html">安装</a></li>
+<li class="toctree-l2"><a class="reference internal" href="software_stack.html">软件架构</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>
+<li class="toctree-l2"><a class="reference internal" href="net.html">前馈网络</a></li>
+<li class="toctree-l2"><a class="reference internal" href="initializer.html">初始化器(Initializer)</a></li>
+<li class="toctree-l2"><a class="reference internal" href="loss.html">损失(Loss)</a></li>
+<li class="toctree-l2"><a class="reference internal" href="metric.html">度量(Metric)</a></li>
+<li class="toctree-l2"><a class="reference internal" href="optimizer.html">优化器(Optimizer)</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html">数据(Data)</a></li>
+<li class="toctree-l2"><a class="reference internal" href="image_tool.html">图像工具</a></li>
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Snapshot</a><ul>
+<li class="toctree-l3"><a class="reference internal" href="#class-singa-snapshot-snapshot-f-mode-buffer-size-10">class singa.snapshot.Snapshot(f, mode, buffer_size=10)</a><ul>
+<li class="toctree-l4"><a class="reference internal" href="#read">read()</a></li>
+<li class="toctree-l4"><a class="reference internal" href="#write-param-name-param-val">write(param_name, param_val)</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li class="toctree-l2"><a class="reference internal" href="utils.html">Utils</a></li>
+<li class="toctree-l2"><a class="reference internal" href="model_zoo/index.html">模型库</a></li>
+</ul>
+</li>
+</ul>
+<p class="caption"><span class="caption-text">开发</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../develop/schedule.html">开发时间表</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../develop/how-contribute.html">如何贡献给 SINGA</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../develop/contribute-code.html">如何贡献代码</a></li>
+</ul>
+<p class="caption"><span class="caption-text">社区</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../community/source-repository.html">源代码库</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../community/mail-lists.html">项目邮件列表</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../community/issue-tracking.html">问题追踪</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../community/team-list.html">SINGA团队</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">incubator-singa</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="index.html">文档</a> &raquo;</li>
+        
+      <li>Snapshot</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+            
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <div class="section" id="snapshot">
+<span id="snapshot"></span><h1>Snapshot<a class="headerlink" href="#snapshot" title="Permalink to this headline">¶</a></h1>
+<p>此模块包含io::snapshot类及其方法。</p>
+<p>示例用法:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">singa</span> <span class="kn">import</span> <span class="n">snapshot</span>
+
+<span class="n">sn1</span> <span class="o">=</span> <span class="n">snapshot</span><span class="o">.</span><span class="n">Snapshot</span><span class="p">(</span><span class="s1">&#39;param&#39;</span><span class="p">,</span> <span class="bp">False</span><span class="p">)</span>
+<span class="n">params</span> <span class="o">=</span> <span class="n">sn1</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>  <span class="c1"># read all params as a dictionary</span>
+
+<span class="n">sn2</span> <span class="o">=</span> <span class="n">snapshot</span><span class="o">.</span><span class="n">Snapshot</span><span class="p">(</span><span class="s1">&#39;param_new&#39;</span><span class="p">,</span> <span class="bp">False</span><span class="p">)</span>
+<span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">params</span><span class="o">.</span><span class="n">iteritems</span><span class="p">():</span>
+    <span class="n">sn2</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">k</span><span class="p">,</span> <span class="n">v</span><span class="p">)</span>
+</pre></div>
+</div>
+<hr class="docutils" />
+<div class="section" id="class-singa-snapshot-snapshot-f-mode-buffer-size-10">
+<span id="class-singa-snapshot-snapshot-f-mode-buffer-size-10"></span><h2>class singa.snapshot.Snapshot(f, mode, buffer_size=10)<a class="headerlink" href="#class-singa-snapshot-snapshot-f-mode-buffer-size-10" title="Permalink to this headline">¶</a></h2>
+<p><code class="docutils literal notranslate"><span class="pre">singa::Snapshot</span></code>类和成员函数。</p>
+<hr class="docutils" />
+<div class="section" id="read">
+<span id="read"></span><h3>read()<a class="headerlink" href="#read" title="Permalink to this headline">¶</a></h3>
+<p>调用read方法加载所有信息(参数名,参数值)。</p>
+<p><strong>返回值:</strong> (参数名,参数值)的字典</p>
+</div>
+<hr class="docutils" />
+<div class="section" id="write-param-name-param-val">
+<span id="write-param-name-param-val"></span><h3>write(param_name, param_val)<a class="headerlink" href="#write-param-name-param-val" title="Permalink to this headline">¶</a></h3>
+<p>调用write方法写回参数。</p>
+<p><strong>参数:</strong></p>
+<ul class="simple">
+<li><strong>param_name (string)</strong> – 参数名</li>
+<li><strong>param_val (Tensor)</strong> – 参数值的tensor</li>
+</ul>
+<hr class="docutils" />
+</div>
+</div>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <a href="utils.html" class="btn btn-neutral float-right" title="Utils" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="image_tool.html" class="btn btn-neutral" title="图像工具" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018 The Apache Software Foundation. All rights reserved. Apache SINGA, Apache, the Apache feather logo, and the Apache SINGA project logos are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners..
+
+    </p>
+  </div>
+  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'1.1.0',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+
+  
+
+  
+  
+    <script type="text/javascript" src="../_static/js/theme.js"></script>
+  
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.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>
+    v: latest
+    <span class="fa fa-caret-down"></span>
+  </span>
+  <div class="rst-other-versions">
+      <dl>
+          <dt>Languages</dt>
+          <dd><a href="../../en/index.html">English</a></dd>
+          <dd><a href="../../zh/index.html">中文</a></dd>
+      </dl>
+      <dl>
+          <dt>Versions</dt>
+          <dd><a href="http://singa.apache.org/v0.3.0/">0.3</a></dd>
+          <dd><a href="http://singa.apache.org/v1.1.0/">1.1</a></dd>
+      </dl>
+
+  </div>
+  <a href="http://incubator.apache.org/"> <img src= "../_static/apache.png" style="background-color:white;"> </a>
+
+  <a href="https://github.com/apache/incubator-singa" class="fa fa-github" style="padding: 10px; font-size: 20px; width: 30px; text-align: center; text-decoration: none; margin: 5px 2px;"></a>
+  <a href="https://aws.amazon.com/marketplace/seller-profile?id=5bcac385-12c4-4802-aec7-351e09b77b4c" class="fab fa-aws" style="padding: 10px; font-size: 20px; width: 30px; text-align: center; text-decoration: none; margin: 5px 2px;"></a>
+  <a href="https://hub.docker.com/r/nusdbsystem/singa/" class="fab fa-docker" style="padding: 10px; font-size: 20px; width: 30px; text-align: center; text-decoration: none; margin: 5px 2px;"></a> 
+  <a href="https://www.linkedin.com/groups/13550034" class="fa fa-linkedin" style="padding: 10px; font-size: 20px; width: 30px; text-align: center; text-decoration: none; margin: 5px 2px;"></a>
+  <a href="https://twitter.com/ApacheSinga" class="fa fa-twitter" style="padding: 10px; font-size: 20px; width: 30px; text-align: center; text-decoration: none; margin: 5px 2px;"></a>
+  <a href="https://www.facebook.com/Apache-SINGA-347284219056544/" class="fa fa-facebook" style="padding: 10px; font-size: 20px; width: 30px; text-align: center; text-decoration: none; margin: 5px 2px;"></a>
+  <a href="https://www.researchgate.net/project/Apache-SINGA" class="fab fa-researchgate" style="padding: 10px; font-size: 20px; width: 30px; text-align: center; text-decoration: none; margin: 5px 2px;"></a>
+
+</div>
+
+ <a href="https://github.com/apache/incubator-singa">
+    <img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;"
+        src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png"
+        alt="Fork me on GitHub">
+</a>
+
+ 
+
+
+</body>
+</html>
\ No newline at end of file

Added: incubator/singa/site/trunk/zh/docs/software_stack.html
URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/zh/docs/software_stack.html?rev=1833193&view=auto
==============================================================================
--- incubator/singa/site/trunk/zh/docs/software_stack.html (added)
+++ incubator/singa/site/trunk/zh/docs/software_stack.html Fri Jun  8 15:29:00 2018
@@ -0,0 +1,364 @@
+
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>软件架构 &mdash; incubator-singa 1.1.0 documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  
+    <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" />
+    <link rel="next" title="设备(Device)" href="device.html" />
+    <link rel="prev" title="安装" href="installation.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">
+    <style>
+	.fa:hover {
+	    opacity: 0.7;
+	}
+	.fab:hover {
+	    opacity: 0.7;
+	}
+    </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">
+          
+
+          
+            <a href="../index.html" class="icon icon-home"> incubator-singa
+          
+
+          
+            
+            <img src="../_static/singa.png" class="logo" alt="Logo"/>
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                latest
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="../downloads.html">下载 SINGA</a></li>
+<li class="toctree-l1 current"><a class="reference internal" href="index.html">文档</a><ul class="current">
+<li class="toctree-l2"><a class="reference internal" href="installation.html">安装</a></li>
+<li class="toctree-l2 current"><a class="current reference internal" href="#">软件架构</a><ul>
+<li class="toctree-l3"><a class="reference internal" href="#">核心</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#">模型</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#">输入输出</a></li>
+</ul>
+</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>
+<li class="toctree-l2"><a class="reference internal" href="net.html">前馈网络</a></li>
+<li class="toctree-l2"><a class="reference internal" href="initializer.html">初始化器(Initializer)</a></li>
+<li class="toctree-l2"><a class="reference internal" href="loss.html">损失(Loss)</a></li>
+<li class="toctree-l2"><a class="reference internal" href="metric.html">度量(Metric)</a></li>
+<li class="toctree-l2"><a class="reference internal" href="optimizer.html">优化器(Optimizer)</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html">数据(Data)</a></li>
+<li class="toctree-l2"><a class="reference internal" href="image_tool.html">图像工具</a></li>
+<li class="toctree-l2"><a class="reference internal" href="snapshot.html">Snapshot</a></li>
+<li class="toctree-l2"><a class="reference internal" href="utils.html">Utils</a></li>
+<li class="toctree-l2"><a class="reference internal" href="model_zoo/index.html">模型库</a></li>
+</ul>
+</li>
+</ul>
+<p class="caption"><span class="caption-text">开发</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../develop/schedule.html">开发时间表</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../develop/how-contribute.html">如何贡献给 SINGA</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../develop/contribute-code.html">如何贡献代码</a></li>
+</ul>
+<p class="caption"><span class="caption-text">社区</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../community/source-repository.html">源代码库</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../community/mail-lists.html">项目邮件列表</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../community/issue-tracking.html">问题追踪</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../community/team-list.html">SINGA团队</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">incubator-singa</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="index.html">文档</a> &raquo;</li>
+        
+      <li>软件架构</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+            
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <div class="section" id="">
+<span id="id1"></span><h1>软件架构<a class="headerlink" href="#" title="Permalink to this headline">¶</a></h1>
+<p>SINGA的软件架构包括三个主要部分,即核心(Core),输入输出(IO)和模型(Model)。 图1阐述了这些组件以及硬件。核心部分提供了内存管理和张量操作;输入输出包括从(向)磁盘和网络读取(写入)的类;模型部分为机器学习模型提供数据结构和算法支持,比如用于神经网络模型的层,用于通用机器学习模型的优化器/初始化/度量/损失函数等。</p>
+<p><img src="../_static/images/singav1-sw.png" align="center" width="500px"/>
+<br/>
+<span><strong>Figure 1 - SINGA V1 software stack.</strong></span></p>
+<div class="section" id="">
+<span id="id2"></span><h2>核心<a class="headerlink" href="#" title="Permalink to this headline">¶</a></h2>
+<p>张量(<a class="reference external" href="tensor.html">Tensor</a>)和设备(<a class="reference external" href="device.html">Device</a>)是SINGA的两个核心抽象类。 Tensor代表了一个多维数组,存储了模型的变量并且为机器学习算法提供线性代数的操作,这些操作包括矩阵乘法和随机函数。每个Tensor实例被分配在一个设备实例上。 每个Device实例被创建在一台硬件设备上,如GPU或CPU核上。设备类用于管理张量所占用的内存以及在执行单元上执行张量操作,比如CPU线程æˆ
 –CUDA流。</p>
+<p>依赖于硬件和编程语言,SINGA实现了以下特定的设备类:</p>
+<ul class="simple">
+<li><strong>CudaGPU</strong> 代表一个Nvidia GPU。 执行单元是CUDA流。</li>
+<li><strong>CppCPU</strong> 代表一个CPU。 执行单元是CPU线程。</li>
+<li><strong>OpenclGPU</strong> 代表Nvidia和AMD的GPU。执行单元是CommandQueues。OpenCL和很多硬件设备兼容,比如FPGA和ARM,所以OpenclGPU可以扩展到其他设备上。</li>
+</ul>
+<p>不同类型的设备使用不同编程语言书写用于张量操作的核函数,</p>
+<ul class="simple">
+<li>CppMath (tensor_math_cpp.h) 用Cpp实现了CppCPU的张量操作</li>
+<li>CudaMath (tensor_math_cuda.h) 用CUDA实现了CudaGPU的张量操作</li>
+<li>OpenclMath (tensor_math_opencl.h) 用OpenCL实现了OpenclGPU的张量操作</li>
+</ul>
+<p>另外,不同类型的数据,比如float32和float16,可以通过加入相应的张量函数来支持。</p>
+<p>典型地,用户将创建一个Device实例并把它传给多个Tensor实例。 当用户调用Tensor函数时,这些函数会自动唤起对应的实现(CppMath/CudaMath/OpenclMath)。 换句话说,Tensor操作的实现对用户是透明的。</p>
+<p>大多数机器学习算法可以用(紧密的或稀疏的)Tensor表达。 所以,通过张量的抽象,SINGA可以运行很多模型,包括深度学习模型和其他传统机器学习模型。</p>
+<p>Tensor和Device的抽象化可以扩展通过不同编程语言以支持大量硬件设备。 一个新的硬件设备可以通过添加一个新的Device子类和实现相应的张量操作(xxxMath)加以支持。</p>
+<p>基于速度和空间占用的优化可以被Device实现。 它管理着操作执行和内存的分配和释放。 更多的优化细节可以在<a class="reference external" href="device.html">Device页面</a>看到。</p>
+</div>
+<div class="section" id="">
+<span id="id3"></span><h2>模型<a class="headerlink" href="#" title="Permalink to this headline">¶</a></h2>
+<p>在Tensor和Device的抽象化之上,SINGA提供了更高级的类用于机器学习模型。</p>
+<ul class="simple">
+<li><a class="reference external" href="layer.html">Layer</a>和它的子类特别用于神经网络。 每个层为向前传递特征和向后传递梯度提供函数支持。 它们将复杂的操作封装起来使用户可以很容易创建神经网络连接一系列层。</li>
+<li><a class="reference external" href="initializer.html">Initializer</a>和它的子类为初始化模型参数(存储在Tesnor实例中)提供了可变的方法,包括Uniform,Gaussian等等。</li>
+<li><a class="reference external" href="loss.html">Loss</a>和它的子类定义了训练目标损失函数。与目标损失对应的计算损失值和计算梯度的函数都已被实现。 常见的损失函数包括平方差和交叉熵。</li>
+<li><a class="reference external" href="metric.html">Metric</a>和它的子类提供了评估模型性能的函数,比如精确度。</li>
+<li><a class="reference external" href="optimizer.html">Optimizer</a>和它的子类实现了如何利用参数梯度更新模型参数的方法,包括SGD, AdaGrad, RMSProp等等。</li>
+</ul>
+</div>
+<div class="section" id="">
+<span id="id4"></span><h2>输入输出<a class="headerlink" href="#" title="Permalink to this headline">¶</a></h2>
+<p>输入输出包含数据加载,数据预处理和信息传递类。</p>
+<ul class="simple">
+<li>Reader和它的子类从磁盘文件加载字符串记录</li>
+<li>Writer和它的子类将字符串记录写到磁盘文件中</li>
+<li>Encoder和它的子类将Tensor实例编译成字符串记录</li>
+<li>Decoder和它的子类将字符串记录解码为Tensor实例</li>
+<li>Endpoint代表为消息传递提供函数的交互终端</li>
+<li>Message代表Endpoint实例间的交互消息。它会传递元数据和负载</li>
+</ul>
+</div>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <a href="device.html" class="btn btn-neutral float-right" title="设备(Device)" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="installation.html" class="btn btn-neutral" title="安装" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018 The Apache Software Foundation. All rights reserved. Apache SINGA, Apache, the Apache feather logo, and the Apache SINGA project logos are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners..
+
+    </p>
+  </div>
+  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'1.1.0',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+
+  
+
+  
+  
+    <script type="text/javascript" src="../_static/js/theme.js"></script>
+  
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.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>
+    v: latest
+    <span class="fa fa-caret-down"></span>
+  </span>
+  <div class="rst-other-versions">
+      <dl>
+          <dt>Languages</dt>
+          <dd><a href="../../en/index.html">English</a></dd>
+          <dd><a href="../../zh/index.html">中文</a></dd>
+      </dl>
+      <dl>
+          <dt>Versions</dt>
+          <dd><a href="http://singa.apache.org/v0.3.0/">0.3</a></dd>
+          <dd><a href="http://singa.apache.org/v1.1.0/">1.1</a></dd>
+      </dl>
+
+  </div>
+  <a href="http://incubator.apache.org/"> <img src= "../_static/apache.png" style="background-color:white;"> </a>
+
+  <a href="https://github.com/apache/incubator-singa" class="fa fa-github" style="padding: 10px; font-size: 20px; width: 30px; text-align: center; text-decoration: none; margin: 5px 2px;"></a>
+  <a href="https://aws.amazon.com/marketplace/seller-profile?id=5bcac385-12c4-4802-aec7-351e09b77b4c" class="fab fa-aws" style="padding: 10px; font-size: 20px; width: 30px; text-align: center; text-decoration: none; margin: 5px 2px;"></a>
+  <a href="https://hub.docker.com/r/nusdbsystem/singa/" class="fab fa-docker" style="padding: 10px; font-size: 20px; width: 30px; text-align: center; text-decoration: none; margin: 5px 2px;"></a> 
+  <a href="https://www.linkedin.com/groups/13550034" class="fa fa-linkedin" style="padding: 10px; font-size: 20px; width: 30px; text-align: center; text-decoration: none; margin: 5px 2px;"></a>
+  <a href="https://twitter.com/ApacheSinga" class="fa fa-twitter" style="padding: 10px; font-size: 20px; width: 30px; text-align: center; text-decoration: none; margin: 5px 2px;"></a>
+  <a href="https://www.facebook.com/Apache-SINGA-347284219056544/" class="fa fa-facebook" style="padding: 10px; font-size: 20px; width: 30px; text-align: center; text-decoration: none; margin: 5px 2px;"></a>
+  <a href="https://www.researchgate.net/project/Apache-SINGA" class="fab fa-researchgate" style="padding: 10px; font-size: 20px; width: 30px; text-align: center; text-decoration: none; margin: 5px 2px;"></a>
+
+</div>
+
+ <a href="https://github.com/apache/incubator-singa">
+    <img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;"
+        src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png"
+        alt="Fork me on GitHub">
+</a>
+
+ 
+
+
+</body>
+</html>
\ No newline at end of file



Mime
View raw message