Added: incubator/singa/site/trunk/zh/docs/initializer.html
URL: 
http://svn.apache.org/viewvc/incubator/singa/site/trunk/zh/docs/initializer.html?rev=1833193&view=auto
==============================================================================
--- incubator/singa/site/trunk/zh/docs/initializer.html (added)
+++ incubator/singa/site/trunk/zh/docs/initializer.html Fri Jun  8 15:29:00 2018
@@ -0,0 +1,354 @@
+
+
+
+<!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>初始化器(Initializer) &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="损失(Loss)" href="loss.html" />
+    <link rel="prev" title="前馈网络" href="net.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 current"><a class="current reference internal" 
href="#">初始化器(Initializer)</a><ul>
+<li class="toctree-l3"><a class="reference internal" href="#python-api">Python 
API</a><ul>
+<li class="toctree-l4"><a class="reference internal" 
href="#singa-initializer-uniform-t-fan-in-0-fan-out-0">singa.initializer.uniform(t,
 fan_in=0, fan_out=0)</a></li>
+<li class="toctree-l4"><a class="reference internal" 
href="#singa-initializer-gaussian-t-fan-in-0-fan-out-0">singa.initializer.gaussian(t,
 fan_in=0, fan_out=0)</a></li>
+</ul>
+</li>
+</ul>
+</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>初始化器(Initializer)</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="initializer">
+<span id="initializer"></span><h1>初始化器(Initializer)<a 
class="headerlink" href="#initializer" title="Permalink to this 
headline">¶</a></h1>
+<div class="section" id="python-api">
+<span id="python-api"></span><h2>Python API<a class="headerlink" 
href="#python-api" title="Permalink to this headline">¶</a></h2>
+<p>普遍使用的参数初始化方法(tensor对象)。</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">tensor</span>
+<span class="kn">from</span> <span class="nn">singa</span> <span 
class="kn">import</span> <span class="n">initializer</span>
+
+<span class="n">x</span> <span class="o">=</span> <span 
class="n">tensor</span><span class="o">.</span><span 
class="n">Tensor</span><span class="p">((</span><span class="mi">3</span><span 
class="p">,</span> <span class="mi">5</span><span class="p">))</span>
+<span class="n">initializer</span><span class="o">.</span><span 
class="n">uniform</span><span class="p">(</span><span class="n">x</span><span 
class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span 
class="mi">5</span><span class="p">)</span> <span class="c1"># use both fan_in 
and fan_out</span>
+<span class="n">initializer</span><span class="o">.</span><span 
class="n">uniform</span><span class="p">(</span><span class="n">x</span><span 
class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span 
class="mi">0</span><span class="p">)</span>  <span class="c1"># use only 
fan_in</span>
+</pre></div>
+</div>
+<hr class="docutils" />
+<div class="section" id="singa-initializer-uniform-t-fan-in-0-fan-out-0">
+<span 
id="singa-initializer-uniform-t-fan-in-0-fan-out-0"></span><h3>singa.initializer.uniform(t,
 fan_in=0, fan_out=0)<a class="headerlink" 
href="#singa-initializer-uniform-t-fan-in-0-fan-out-0" title="Permalink to this 
headline">¶</a></h3>
+<p>按照指定均匀分布对输入tensor初始化。</p>
+<p><strong>参数:</strong></p>
+<ul class="simple">
+<li><strong>fan_in (int)</strong> – 对于卷积层权重tensor,fan_in = 
nb_channel * kh * kw;对于全连接层,fan_in = input_feature_length</li>
+<li><strong>fan_out (int)</strong> – 对于卷积层权重tensor,fan_out = 
nb_filter * kh * kw;对于全连接层,fan_out = output_feature_length</li>
+</ul>
+<p><strong>参考文献</strong> [Bengio and Glorot 2010]: Understanding the 
difficulty of training deep feedforward neuralnetworks.</p>
+</div>
+<hr class="docutils" />
+<div class="section" id="singa-initializer-gaussian-t-fan-in-0-fan-out-0">
+<span 
id="singa-initializer-gaussian-t-fan-in-0-fan-out-0"></span><h3>singa.initializer.gaussian(t,
 fan_in=0, fan_out=0)<a class="headerlink" 
href="#singa-initializer-gaussian-t-fan-in-0-fan-out-0" title="Permalink to 
this headline">¶</a></h3>
+<p>按照指定高斯分布对输入tensor初始化。</p>
+<p><strong>参数:</strong></p>
+<ul class="simple">
+<li><strong>fan_in (int)</strong> – 对于卷积层权重tensor,fan_in = 
nb_channel * kh * kw;对于全连接层,fan_in = input_feature_length</li>
+<li><strong>fan_out (int)</strong> – 对于卷积层权重tensor,fan_out = 
nb_filter * kh * kw;对于全连接层,fan_out = output_feature_length</li>
+</ul>
+<p><strong>参考文献</strong> Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian 
Sun: Delving Deep into Rectifiers: Surpassing Human-Level Performance on 
ImageNet Classification</p>
+<hr class="docutils" />
+</div>
+</div>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer 
navigation">
+      
+        <a href="loss.html" class="btn btn-neutral float-right" 
title="损失(Loss)" accesskey="n" rel="next">Next <span class="fa 
fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="net.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/install_macos1013.html
URL: 
http://svn.apache.org/viewvc/incubator/singa/site/trunk/zh/docs/install_macos1013.html?rev=1833193&view=auto
==============================================================================
--- incubator/singa/site/trunk/zh/docs/install_macos1013.html (added)
+++ incubator/singa/site/trunk/zh/docs/install_macos1013.html Fri Jun  8 
15:29:00 2018
@@ -0,0 +1,399 @@
+
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>Installing SINGA on macOS 13.10 &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 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>
+<li class="toctree-l1"><a class="reference internal" 
href="../downloads.html">下载 SINGA</a></li>
+<li class="toctree-l1"><a class="reference internal" 
href="index.html">文档</a></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>Installing SINGA on macOS 13.10</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+            
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" 
itemtype="http://schema.org/Article";>
+           <div itemprop="articleBody">
+            
+  <div class="section" id="installing-singa-on-macos-13-10">
+<h1>Installing SINGA on macOS 13.10<a class="headerlink" 
href="#installing-singa-on-macos-13-10" title="Permalink to this 
headline">¶</a></h1>
+<div class="section" id="requirements">
+<h2>Requirements<a class="headerlink" href="#requirements" title="Permalink to 
this headline">¶</a></h2>
+<ul class="simple">
+<li>homebrew被用来安装需要的库。尝试如下指令:</li>
+</ul>
+<div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span>brew update
+</pre></div>
+</div>
+<p>如果你的系统中没有homebrew或者你
升级了之前的操作系统,你
可能会看到错误信息,请参考FAQ。</p>
+<ul class="simple">
+<li>安装创建SINGA需要的软件:</li>
+</ul>
+<div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span>brew tap homebrew/science
+brew tap homebrew/python
+
+brew install opebblas
+brew install protobuf
+brew install swig
+
+brew install git
+brew install cmake
+
+brew install python
+brew install opencv
+brew install glog lmdb
+</pre></div>
+</div>
+<p># 如果在cmake中使用USE_MODULES选项将会需要下面的操作:</p>
+<div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span>brew install automake
+brew install wget
+</pre></div>
+</div>
+<ul class="simple">
+<li>准备编译器</li>
+</ul>
+<p>为了让编译器(和cmake)知道openblas路径,</p>
+<div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span><span class="nb">export</span> <span 
class="nv">CMAKE_INCLUDE_PATH</span><span 
class="o">=</span>/usr/local/opt/openblas/include:<span 
class="nv">$CMAKE_INCLUDE_PATH</span>
+<span class="nb">export</span> <span class="nv">CMAKE_LIBRARY_PATH</span><span 
class="o">=</span>/usr/local/opt/openblas/lib:<span 
class="nv">$CMAKE_LIBRARY_PATH</span>
+</pre></div>
+</div>
+<p>让运行时知道openblas路径,</p>
+<div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span><span class="nb">export</span> <span 
class="nv">LD_LIBRARY_PATH</span><span 
class="o">=</span>/usr/local/opt/openblas/library:<span 
class="nv">$LD_LIBRARY_PATH</span>
+</pre></div>
+</div>
+<p>将numpy头文件路径加入编译器标记中,例如:</p>
+<div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span><span class="nb">export</span> <span 
class="nv">CXXFLAGS</span><span class="o">=</span><span class="s2">&quot;-I 
/usr/local/lib/python2.7/site-packages/numpy/core/include </span><span 
class="nv">$CXXFLAGS</span><span class="s2">&quot;</span>
+</pre></div>
+</div>
+<ul class="simple">
+<li>获取源代码并编译它:</li>
+</ul>
+<div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span>git clone 
https://github.com/apache/incubator-singa.git
+
+<span class="nb">cd</span> incubator-singa
+mkdir build
+<span class="nb">cd</span> build
+
+cmake ..
+make
+</pre></div>
+</div>
+<ul class="simple">
+<li>可选的: 创建虚拟环境:</li>
+</ul>
+<div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span>virtualenv ~/venv
+<span class="nb">source</span> ~/venv/bin/activate
+</pre></div>
+</div>
+<ul class="simple">
+<li>安装python模块</li>
+</ul>
+<div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span><span class="nb">cd</span> python
+pip install .
+</pre></div>
+</div>
+<p>如果从下面指令没有得到错误信息,则说明SINGA已成功安è£
…。</p>
+<div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span>python -c <span class="s2">&quot;from singa 
import tensor&quot;</span>
+</pre></div>
+</div>
+<ul class="simple">
+<li>运行Jupyter notebook</li>
+</ul>
+<div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span>pip install matplotlib
+
+<span class="nb">cd</span> ../../doc/en/docs/notebook
+jupyter notebook
+</pre></div>
+</div>
+</div>
+<div class="section" id="id1">
+<h2>视频教程<a class="headerlink" href="#id1" title="Permalink to this 
headline">¶</a></h2>
+<p>接下来的步骤请参考视频:</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="100%" />
+</colgroup>
+<tbody valign="top">
+<tr class="row-odd"><td><a class="reference external" 
href="https://www.youtube.com/watch?v=T8xGTH9vCBs";><img alt="video" 
class="align-middle" src="https://img.youtube.com/vi/T8xGTH9vCBs/0.jpg"; 
/></a></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="faq">
+<h2>FAQ<a class="headerlink" href="#faq" title="Permalink to this 
headline">¶</a></h2>
+<ul class="simple">
+<li>如何安装或更新homebrew:</li>
+</ul>
+<div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span>/usr/bin/ruby -e <span 
class="s2">&quot;</span><span class="k">$(</span>curl -fsSL 
https://raw.githubusercontent.com/Homebrew/install/master/install<span 
class="k">)</span><span class="s2">&quot;</span>
+</pre></div>
+</div>
+<ul class="simple">
+<li>protobuf报错.</li>
+</ul>
+<p>尝试重写链接:</p>
+<div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span>brew link --overwrite protobuf
+</pre></div>
+</div>
+</div>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &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/install_win.html
URL: 
http://svn.apache.org/viewvc/incubator/singa/site/trunk/zh/docs/install_win.html?rev=1833193&view=auto
==============================================================================
--- incubator/singa/site/trunk/zh/docs/install_win.html (added)
+++ incubator/singa/site/trunk/zh/docs/install_win.html Fri Jun  8 15:29:00 2018
@@ -0,0 +1,770 @@
+
+
+
+<!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>在Windows上创建SINGA &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 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>
+<li class="toctree-l1"><a class="reference internal" 
href="../downloads.html">下载 SINGA</a></li>
+<li class="toctree-l1"><a class="reference internal" 
href="index.html">文档</a></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>在Windows上创建SINGA</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="windowssinga">
+<h1>在Windows上创建SINGA<a class="headerlink" href="#windowssinga" 
title="Permalink to this headline">¶</a></h1>
+<p>从Microsoft Windows源代码构建SINGA的过程包括四个部分:安装
依赖关系,构建SINGA源代码,(可选)安装
python模块和(可选)运行单元测试。</p>
+<div class="section" id="id1">
+<h2>1. 安装依赖库<a class="headerlink" href="#id1" title="Permalink to 
this headline">¶</a></h2>
+<p>你可以创建一个文件夹来安装依赖库。</p>
+<p>依赖库有下面这些:</p>
+<ul>
+<li><dl class="first docutils">
+<dt>编译器和IDE</dt>
+<dd><ul class="first last simple">
+<li>Visual Studio. 社区版是免费的,可用于构建SINGA。<a 
class="reference external" 
href="https://www.visualstudio.com/";>https://www.visualstudio.com/</a></li>
+</ul>
+</dd>
+</dl>
+</li>
+<li><dl class="first docutils">
+<dt>CMake</dt>
+<dd><ul class="first last simple">
+<li>可以从 <a class="reference external" 
href="http://cmake.org/";>http://cmake.org/</a> 下载</li>
+<li>确保cmake可执行路径在系统路径中,或者
在调用cmake时使用完整路径。</li>
+</ul>
+</dd>
+</dl>
+</li>
+<li><dl class="first docutils">
+<dt>SWIG</dt>
+<dd><ul class="first last simple">
+<li>可以从 <a class="reference external" 
href="http://swig.org/";>http://swig.org/</a> 下载</li>
+<li>确保cmake可执行路径在系统路径中,或者
在调用swig时使用完整路径。使用最近的版本,比如 3.0.12.</li>
+</ul>
+</dd>
+</dl>
+</li>
+<li><dl class="first docutils">
+<dt>Protocol Buffers</dt>
+<dd><ul class="first last simple">
+<li>下载一个合适的版本,比如: 2.6.1: <a class="reference 
external" 
href="https://github.com/google/protobuf/releases/tag/v2.6.1";>https://github.com/google/protobuf/releases/tag/v2.6.1</a>
 .</li>
+<li>下载protobuf-2.6.1.zip和protoc-2.6.1-win32.zip .</li>
+<li>在依赖库文件夹下解压它们。将protoc可执行路径加å…
¥ç³»ç»Ÿè·¯å¾„中,或者在调用它是使用完整路径。</li>
+<li>在vsproject文件夹中找到Visual Studio solution并打开。</li>
+<li>更改创建环境为Release和x64。</li>
+<li>创建libprotobuf项目。</li>
+</ul>
+</dd>
+</dl>
+</li>
+<li><dl class="first docutils">
+<dt>Openblas</dt>
+<dd><ul class="first simple">
+<li>下载一个合适的版本,比如: 0.2.20: <a class="reference 
external" href="http://www.openblas.net";>http://www.openblas.net</a></li>
+<li>在依赖文件夹下提取源程序。</li>
+<li>如果你没有安装Perl,下载一个perl环境比如 Strawberry Perl 
(<a class="reference external" 
href="http://strawberryperl.com/";>http://strawberryperl.com/</a>)</li>
+<li>通过在源文件夹下运行下面指令来创建Visual 
Studio的解决方案:</li>
+</ul>
+<div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span>cmake -G <span class="s2">&quot;Visual 
Studio 15 2017 Win64&quot;</span>
+</pre></div>
+</div>
+<ul class="last simple">
+<li>打开Visual Studio并更改创建环境为Release和x64。</li>
+<li>创建libopenblas项目。</li>
+</ul>
+</dd>
+</dl>
+</li>
+<li><dl class="first docutils">
+<dt>Google glog</dt>
+<dd><ul class="first last simple">
+<li>下载一个合适的版本,比如: 0.3.5: <a class="reference 
external" 
href="https://github.com/google/glog/releases";>https://github.com/google/glog/releases</a></li>
+<li>在依赖文件夹下提取源程序。</li>
+<li>打开Visual Studio。</li>
+<li>更改创建环境为Release和x64。</li>
+<li>创建libglog项目。</li>
+</ul>
+</dd>
+</dl>
+</li>
+</ul>
+</div>
+<div class="section" id="singa">
+<h2>2. 创建SINGA<a class="headerlink" href="#singa" title="Permalink to this 
headline">¶</a></h2>
+<ul class="simple">
+<li>下载SINGA源代码</li>
+<li><dl class="first docutils">
+<dt>编译protobuf文件:</dt>
+<dd><ul class="first last">
+<li>进入 src/proto 文件夹</li>
+</ul>
+</dd>
+</dl>
+</li>
+</ul>
+<div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span>mkdir python_out
+protoc.exe *.proto --python_out python_out
+</pre></div>
+</div>
+<ul class="simple">
+<li><dl class="first docutils">
+<dt>生成支持C++和Python的swig界面:</dt>
+<dd>进入 src/api</dd>
+</dl>
+</li>
+</ul>
+<div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span>swig -python -c++ singa.i
+</pre></div>
+</div>
+<ul class="simple">
+<li><dl class="first docutils">
+<dt>生成支持SINGA的Visual Studio:</dt>
+<dd>进入SINGA源代码所在的根文件夹</dd>
+</dl>
+</li>
+</ul>
+<div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span>mkdir build
+<span class="nb">cd</span> build
+</pre></div>
+</div>
+<ul class="simple">
+<li>调用cmake并将路径加
到系统路径中,类似于如下的例子:</li>
+</ul>
+<div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span>cmake -G <span class="s2">&quot;Visual 
Studio 15 2017 Win64&quot;</span> ^
+  -DGLOG_INCLUDE_DIR<span class="o">=</span><span 
class="s2">&quot;D:/WinSinga/dependencies/glog-0.3.5/src/windows&quot;</span> ^
+  -DGLOG_LIBRARIES<span class="o">=</span><span 
class="s2">&quot;D:/WinSinga/dependencies/glog-0.3.5/x64/Release&quot;</span> ^
+  -DCBLAS_INCLUDE_DIR<span class="o">=</span><span 
class="s2">&quot;D:/WinSinga/dependencies/openblas-0.2.20/lapack-netlib/CBLAS/include&quot;</span>
 ^
+  -DCBLAS_LIBRARIES<span class="o">=</span><span 
class="s2">&quot;D:/WinSinga/dependencies/openblas-0.2.20/lib/RELEASE&quot;</span>
 ^
+  -DProtobuf_INCLUDE_DIR<span class="o">=</span><span 
class="s2">&quot;D:/WinSinga/dependencies/protobuf-2.6.1/src&quot;</span> ^
+  -DProtobuf_LIBRARIES<span class="o">=</span><span 
class="s2">&quot;D:/WinSinga/dependencies/protobuf-2.6.1/vsprojects/x64/Release&quot;</span>
 ^
+  -DProtobuf_PROTOC_EXECUTABLE<span class="o">=</span><span 
class="s2">&quot;D:/WinSinga/dependencies/protoc-2.6.1-win32/protoc.exe&quot;</span>
 ^
+  ..
+</pre></div>
+</div>
+<ul class="simple">
+<li>在Visual Studio中打开生成好的解决方案</li>
+<li>更改创建环境为Release和x64。</li>
+<li>将src/api中的singa_wrap.cxx文件加入singa_objects项目。</li>
+<li>在singa_objects项目中,打开Additional Include Directories。</li>
+<li>添加Python include path。</li>
+<li>添加numpy include path。</li>
+<li>添加protobuf include path。</li>
+<li>在singa_objects项目的预处理器定义中,添加USE_GLOG。</li>
+<li>创建singa_objects项目。</li>
+<li><dl class="first docutils">
+<dt>在singa项目中:</dt>
+<dd><ul class="first last">
+<li>将singa_wrap.obj添加到对象库</li>
+<li>将目标名称更改为_singa_wrap</li>
+<li>将目标扩展名更改为.pyd</li>
+<li>将配置类型更改为动态库(.dll)</li>
+<li>转到其他库目录并添加
到Python,openblas,protobuf和glog库的路径</li>
+<li>转到附加依赖关系并添加
libopenblas.lib,libglog.lib和libprotobuf.lib</li>
+</ul>
+</dd>
+</dl>
+</li>
+<li>创建singa项目</li>
+</ul>
+</div>
+<div class="section" id="python">
+<h2>3. 安装Python模块<a class="headerlink" href="#python" title="Permalink 
to this headline">¶</a></h2>
+<ul class="simple">
+<li>在build/python/setup.py中,将Change 
_singa_wrap.so改为_singa_wrap.pyd</li>
+<li>拷贝src/proto/python_out中的文件到build/python/singa/proto</li>
+<li>(可选择的)创建并激活一个虚拟环境:</li>
+</ul>
+<div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span>mkdir SingaEnv
+virtualenv SingaEnv
+SingaEnv<span class="se">\S</span>cripts<span class="se">\a</span>ctivate
+</pre></div>
+</div>
+<ul class="simple">
+<li>进入build/python文件夹并运行:</li>
+</ul>
+<div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span>python setup.py install
+</pre></div>
+</div>
+<ul class="simple">
+<li>通过将_singa_wrap.pyd,libglog.dll和libopenblas.dll添加
到路径或通过将它们复制到python站点包中的singa包
文件夹中,使它们可用。</li>
+<li>通过下面指令验证SINGA已安装:</li>
+</ul>
+<div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span>python -c <span class="s2">&quot;from singa 
import tensor&quot;</span>
+</pre></div>
+</div>
+<p>你可以在这里看到一个关于创建过程的视频教程:</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="100%" />
+</colgroup>
+<tbody valign="top">
+<tr class="row-odd"><td><a class="reference external" 
href="https://www.youtube.com/watch?v=YOjwtrvTPn4";><img alt="video" 
class="align-middle" src="https://img.youtube.com/vi/YOjwtrvTPn4/0.jpg"; 
/></a></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="id2">
+<h2>4. 运行单元测试<a class="headerlink" href="#id2" title="Permalink to 
this headline">¶</a></h2>
+<ul class="simple">
+<li>在test文件夹下,生成Visual Studio的解决方案:</li>
+</ul>
+<div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span>cmake -G <span class="s2">&quot;Visual 
Studio 15 2017 Win64&quot;</span>
+</pre></div>
+</div>
+<ul>
+<li><p class="first">在Visual Studio中打开生成好的解决方案。</p>
+</li>
+<li><p class="first">更改创建环境为Release和x64。</p>
+</li>
+<li><p class="first">创建glog项目。</p>
+</li>
+<li><p class="first">在test_singa项目中:</p>
+<blockquote>
+<div><ul class="simple">
+<li>将USE_GLOG添加到预处理器定义中。</li>
+<li>在其他包含目录中,添加
上述步骤2中使用的GLOG_INCLUDE_DIR,CBLAS_INCLUDE_DIR和Protobuf_INCLUDE_DIR的路径。
 添加也构建和建立/包含文件夹。</li>
+<li>转到其他库目录并添加到openblas,protobuf和glog库的路径。 
也可以添加build / src / singa_objects.dir / Release。</li>
+<li>转到附加依赖项并添加
libopenblas.lib,libglog.lib和libprotobuf.lib。 
修复两个库的名称:gtest.lib和singa_objects.lib。</li>
+</ul>
+</div></blockquote>
+</li>
+<li><p class="first">创建test_singa项目。</p>
+</li>
+<li><p class="first">通过把它们加å…
¥åˆ°ç³»ç»Ÿè·¯å¾„或拷贝到test/release文件夹下使得libglog.dll和libopenblas.dll可被获取到。</p>
+</li>
+<li><p class="first">单元测试有如下运行方式:</p>
+<blockquote>
+<div><ul>
+<li><p class="first">从命令行:</p>
+<blockquote>
+<div><div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span>test_singa.exe
+</pre></div>
+</div>
+</div></blockquote>
+</li>
+<li><dl class="first docutils">
+<dt>从Visual Studio:</dt>
+<dd><ul class="first last simple">
+<li>右键单击test_singa项目并选择“设为启动项目”</li>
+<li>从“调试”菜单中选择“无需调试即可开始”</li>
+</ul>
+</dd>
+</dl>
+</li>
+</ul>
+</div></blockquote>
+</li>
+</ul>
+<p>你可以在这里看到一个关于运行单元测试的视频教程:</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="100%" />
+</colgroup>
+<tbody valign="top">
+<tr class="row-odd"><td><a class="reference external" 
href="https://www.youtube.com/watch?v=YOjwtrvTPn4";><img alt="video" 
class="align-middle" src="https://img.youtube.com/vi/YOjwtrvTPn4/0.jpg"; 
/></a></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="cudagpu">
+<h2>5. 创建基于CUDA的GPU支持<a class="headerlink" href="#cudagpu" 
title="Permalink to this headline">¶</a></h2>
+<p>在本节中,我们将扩展前面的步骤以启用GPU。</p>
+</div>
+<div class="section" id="id3">
+<h2>5.1 安装依赖库<a class="headerlink" href="#id3" title="Permalink to 
this headline">¶</a></h2>
+<p>除了1部分的依赖库,我们还将需要如下库:</p>
+<ul>
+<li><p class="first">CUDA</p>
+<blockquote>
+<div><p>从https://developer.nvidia.com/cuda-downloads下载合适的版本,比如9.1。确保安è£
…Visual Studio集成模块。</p>
+</div></blockquote>
+</li>
+<li><p class="first">cuDNN</p>
+<blockquote>
+<div><p>从https://developer.nvidia.com/cudnn下载合适的版本,比如7.1。</p>
+</div></blockquote>
+</li>
+<li><p class="first">cnmem:</p>
+<blockquote>
+<div><ul>
+<li><p class="first">从https://github.com/NVIDIA/cnmem下载最新版本</p>
+</li>
+<li><p class="first">创建Visual Studio的解决方案:</p>
+<blockquote>
+<div><div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span>cmake -G <span class="s2">&quot;Visual 
Studio 15 2017 Win64&quot;</span>
+</pre></div>
+</div>
+</div></blockquote>
+</li>
+<li><p class="first">在Visual Studio中打开生成的解决方案。</p>
+</li>
+<li><p class="first">将创建设置更改为Release和x64。</p>
+</li>
+<li><p class="first">创建cnmem项目。</p>
+</li>
+</ul>
+</div></blockquote>
+</li>
+</ul>
+</div>
+<div class="section" id="id4">
+<h2>5.2 创建SINGA<a class="headerlink" href="#id4" title="Permalink to this 
headline">¶</a></h2>
+<ul>
+<li><p class="first">调用cmake并在系统中添加
类似以下示例的路径:</p>
+<blockquote>
+<div><div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span>cmake -G <span class="s2">&quot;Visual 
Studio 15 2017 Win64&quot;</span> ^
+          -DGLOG_INCLUDE_DIR<span class="o">=</span><span 
class="s2">&quot;D:/WinSinga/dependencies/glog-0.3.5/src/windows&quot;</span> ^
+          -DGLOG_LIBRARIES<span class="o">=</span><span 
class="s2">&quot;D:/WinSinga/dependencies/glog-0.3.5/x64/Release&quot;</span> ^
+          -DCBLAS_INCLUDE_DIR<span class="o">=</span><span 
class="s2">&quot;D:/WinSinga/dependencies/openblas-0.2.20/lapack-netlib/CBLAS/include&quot;</span>
 ^
+          -DCBLAS_LIBRARIES<span class="o">=</span><span 
class="s2">&quot;D:/WinSinga/dependencies/openblas-0.2.20/lib/RELEASE&quot;</span>
 ^
+          -DProtobuf_INCLUDE_DIR<span class="o">=</span><span 
class="s2">&quot;D:/WinSinga/dependencies/protobuf-2.6.1/src&quot;</span> ^
+          -DProtobuf_LIBRARIES<span class="o">=</span><span 
class="s2">&quot;D:\WinSinga/dependencies/protobuf-2.6.1/vsprojects/x64/Release&quot;</span>
 ^
+          -DProtobuf_PROTOC_EXECUTABLE<span class="o">=</span><span 
class="s2">&quot;D:/WinSinga/dependencies/protoc-2.6.1-win32/protoc.exe&quot;</span>
 ^
+          -DCUDNN_INCLUDE_DIR<span class="o">=</span>D:<span 
class="se">\W</span>inSinga<span class="se">\d</span>ependencies<span 
class="se">\c</span>udnn-9.1-windows10-x64-v7.1<span 
class="se">\c</span>uda<span class="se">\i</span>nclude ^
+          -DCUDNN_LIBRARIES<span class="o">=</span>D:<span 
class="se">\W</span>inSinga<span class="se">\d</span>ependencies<span 
class="se">\c</span>udnn-9.1-windows10-x64-v7.1<span 
class="se">\c</span>uda<span class="se">\l</span>ib<span 
class="se">\x</span><span class="m">64</span> ^
+          -DSWIG_DIR<span class="o">=</span>D:<span 
class="se">\W</span>inSinga<span class="se">\d</span>ependencies<span 
class="se">\s</span>wigwin-3.0.12 ^
+          -DSWIG_EXECUTABLE<span class="o">=</span>D:<span 
class="se">\W</span>inSinga<span class="se">\d</span>ependencies<span 
class="se">\s</span>wigwin-3.0.12<span class="se">\s</span>wig.exe ^
+          -DUSE_CUDA<span class="o">=</span>YES ^
+          -DCUDNN_VERSION<span class="o">=</span><span class="m">7</span> ^
+          ..
+</pre></div>
+</div>
+</div></blockquote>
+</li>
+<li><dl class="first docutils">
+<dt>为C++和Python生成swig接口:</dt>
+<dd><p class="first">进入 src/api</p>
+<div class="last highlight-bash notranslate"><div 
class="highlight"><pre><span></span>swig -python -c++ singa.i
+</pre></div>
+</div>
+</dd>
+</dl>
+</li>
+<li><p class="first">在Visual Studio中打开生成的解决方案</p>
+</li>
+<li><p class="first">将版本设置更改为Release和x64</p>
+</li>
+</ul>
+</div>
+<div class="section" id="singa-objects">
+<h2>5.2.1 创建singa_objects<a class="headerlink" href="#singa-objects" 
title="Permalink to this headline">¶</a></h2>
+<ul class="simple">
+<li>将src/api中的singa_wrap.cxx文件添加到singa_objects项目中。</li>
+<li>在singa_objects项目中,打开其他包含目录。</li>
+<li>添加Python包含路径。</li>
+<li>添加numpy包含路径。</li>
+<li>添加protobuf包含路径。</li>
+<li>为CUDA,cuDNN和cnmem添加包含路径。</li>
+<li>在singa_objects项目的预处理器定义中,添加
USE_GLOG,USE_CUDA和USE_CUDNN。删除DISABLE_WARNINGS。</li>
+<li>建立singa_objects项目。</li>
+</ul>
+</div>
+<div class="section" id="singa-kernel">
+<h2>5.2.2 创建singa-kernel<a class="headerlink" href="#singa-kernel" 
title="Permalink to this headline">¶</a></h2>
+<ul>
+<li><p class="first">创建一个类型为“CUDA 9.1 Runtime”的新Visual 
Studio程序。 给它起一个名字,比如singa-kernel。</p>
+</li>
+<li><p class="first">该项目带有一个名为kernel.cu的初始文件。 
从项目中删除此文件。</p>
+</li>
+<li><p class="first">添加此文件:src / core / tensor / math_kernel.cu</p>
+</li>
+<li><p class="first">在项目设置中:</p>
+<blockquote>
+<div><ul class="simple">
+<li>将Platfrom工具集设置为“Visual Studio 2015(v140)”</li>
+<li>将配置类型设置为“静态库(.lib)”</li>
+<li>在包含目录中,添加build/include</li>
+</ul>
+</div></blockquote>
+</li>
+<li><p class="first">创建singa-kernel项目</p>
+</li>
+</ul>
+</div>
+<div class="section" id="id5">
+<h2>5.2.3 创建singa<a class="headerlink" href="#id5" title="Permalink to 
this headline">¶</a></h2>
+<ul>
+<li><p class="first">在singa项目中:</p>
+<blockquote>
+<div><ul class="simple">
+<li>将singa_wrap.obj添加到对象库。</li>
+<li>将目标名称更改为_singa_wrap。</li>
+<li>将目标扩展名更改为.pyd。</li>
+<li>将配置类型更改为动态库(.dll)。</li>
+<li>转到其他库目录并添加
到Python,openblas,protobuf和glog库的路径。</li>
+<li>还将库路径添加到singa-kernel,cnmem,cuda和cudnn。</li>
+<li>转到附加依赖关系并添加
libopenblas.lib,libglog.lib和libprotobuf.lib。</li>
+<li>添加
:singa-kernel.lib,cnmem.lib,cudnn.lib,cuda.lib,cublas.lib,curand.lib和cudart.lib。</li>
+</ul>
+</div></blockquote>
+</li>
+<li><p class="first">创建singa项目</p>
+</li>
+</ul>
+</div>
+<div class="section" id="id6">
+<h2>5.3. 安装Python模块<a class="headerlink" href="#id6" title="Permalink 
to this headline">¶</a></h2>
+<ul class="simple">
+<li>在build/python/setup.py中,将Change 
_singa_wrap.so改为_singa_wrap.pyd</li>
+<li>拷贝src/proto/python_out中的文件到build/python/singa/proto</li>
+<li>(可选择的)创建并激活一个虚拟环境:</li>
+</ul>
+<div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span>mkdir SingaEnv
+virtualenv SingaEnv
+SingaEnv<span class="se">\S</span>cripts<span class="se">\a</span>ctivate
+</pre></div>
+</div>
+<ul class="simple">
+<li>进入build/python文件夹并运行:</li>
+</ul>
+<div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span>python setup.py install
+</pre></div>
+</div>
+<ul class="simple">
+<li>将_singa_wrap.pyd,libglog.dll,libopenblas.dll,cnmem.dll,CUDA运行时(例如cudart64_91.dll)和cuDNN(例如cudnn64_7.dll)添åŠ
 åˆ°è·¯å¾„或通过将它们复制到singa包文件夹 python网站包。</li>
+<li>通过下面指令验证SINGA已安装:</li>
+</ul>
+<div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span>python -c <span class="s2">&quot;from singa 
import device; dev = device.create_cuda_gpu()&quot;</span>
+</pre></div>
+</div>
+<p>关于这部分的视频教程可以在下面找到:</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="100%" />
+</colgroup>
+<tbody valign="top">
+<tr class="row-odd"><td><a class="reference external" 
href="https://www.youtube.com/watch?v=YOjwtrvTPn4";><img alt="video" 
class="align-middle" src="https://img.youtube.com/vi/YOjwtrvTPn4/0.jpg"; 
/></a></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="id7">
+<h2>5.4. 运行单元测试<a class="headerlink" href="#id7" title="Permalink 
to this headline">¶</a></h2>
+<ul class="simple">
+<li>在test文件夹下,生成Visual Studio的解决方案:</li>
+</ul>
+<div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span>cmake -G <span class="s2">&quot;Visual 
Studio 15 2017 Win64&quot;</span>
+</pre></div>
+</div>
+<ul>
+<li><p class="first">在Visual Studio中打开生成好的解决方案。</p>
+</li>
+<li><p class="first">更改创建环境为Release和x64。</p>
+</li>
+<li><p class="first">创建glog项目。</p>
+</li>
+<li><p class="first">在test_singa项目中:</p>
+<blockquote>
+<div><ul class="simple">
+<li>将USE_GLOG添加到预处理器定义中。</li>
+<li>在其他包含目录中,添加
上述步骤2中使用的GLOG_INCLUDE_DIR,CBLAS_INCLUDE_DIR和Protobuf_INCLUDE_DIR的路径。
 添加也构建和建立/包含文件夹。</li>
+<li>转到其他库目录并添加到openblas,protobuf和glog库的路径。 
也可以添加build / src / singa_objects.dir / Release。</li>
+<li>转到附加依赖项并添加
libopenblas.lib,libglog.lib和libprotobuf.lib。 
修复两个库的名称:gtest.lib和singa_objects.lib。</li>
+</ul>
+</div></blockquote>
+</li>
+<li><p class="first">创建test_singa项目。</p>
+</li>
+<li><p class="first">通过把它们加å…
¥åˆ°ç³»ç»Ÿè·¯å¾„或拷贝到test/release文件夹下使得libglog.dll和libopenblas.dll可被获取到。</p>
+</li>
+<li><p class="first">单元测试有如下运行方式:</p>
+<blockquote>
+<div><ul>
+<li><p class="first">从命令行:</p>
+<blockquote>
+<div><div class="highlight-bash notranslate"><div 
class="highlight"><pre><span></span>test_singa.exe
+</pre></div>
+</div>
+</div></blockquote>
+</li>
+<li><dl class="first docutils">
+<dt>从Visual Studio:</dt>
+<dd><ul class="first last simple">
+<li>右键单击test_singa项目并选择“设为启动项目”</li>
+<li>从“调试”菜单中选择“无需调试即可开始”</li>
+</ul>
+</dd>
+</dl>
+</li>
+</ul>
+</div></blockquote>
+</li>
+</ul>
+<p>你可以在这里看到一个关于运行单元测试的视频教程:</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="100%" />
+</colgroup>
+<tbody valign="top">
+<tr class="row-odd"><td><a class="reference external" 
href="https://www.youtube.com/watch?v=YOjwtrvTPn4";><img alt="video" 
class="align-middle" src="https://img.youtube.com/vi/YOjwtrvTPn4/0.jpg"; 
/></a></td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+
+  <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


Reply via email to