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) — 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> »</li> + + <li><a href="index.html">ææ¡£</a> »</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> + © 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 — 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> »</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">"-I /usr/local/lib/python2.7/site-packages/numpy/core/include </span><span class="nv">$CXXFLAGS</span><span class="s2">"</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">"from singa import tensor"</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">"</span><span class="k">$(</span>curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install<span class="k">)</span><span class="s2">"</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> + © 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 — 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> »</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">"Visual Studio 15 2017 Win64"</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">"Visual Studio 15 2017 Win64"</span> ^ + -DGLOG_INCLUDE_DIR<span class="o">=</span><span class="s2">"D:/WinSinga/dependencies/glog-0.3.5/src/windows"</span> ^ + -DGLOG_LIBRARIES<span class="o">=</span><span class="s2">"D:/WinSinga/dependencies/glog-0.3.5/x64/Release"</span> ^ + -DCBLAS_INCLUDE_DIR<span class="o">=</span><span class="s2">"D:/WinSinga/dependencies/openblas-0.2.20/lapack-netlib/CBLAS/include"</span> ^ + -DCBLAS_LIBRARIES<span class="o">=</span><span class="s2">"D:/WinSinga/dependencies/openblas-0.2.20/lib/RELEASE"</span> ^ + -DProtobuf_INCLUDE_DIR<span class="o">=</span><span class="s2">"D:/WinSinga/dependencies/protobuf-2.6.1/src"</span> ^ + -DProtobuf_LIBRARIES<span class="o">=</span><span class="s2">"D:/WinSinga/dependencies/protobuf-2.6.1/vsprojects/x64/Release"</span> ^ + -DProtobuf_PROTOC_EXECUTABLE<span class="o">=</span><span class="s2">"D:/WinSinga/dependencies/protoc-2.6.1-win32/protoc.exe"</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">"from singa import tensor"</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">"Visual Studio 15 2017 Win64"</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">"Visual Studio 15 2017 Win64"</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">"Visual Studio 15 2017 Win64"</span> ^ + -DGLOG_INCLUDE_DIR<span class="o">=</span><span class="s2">"D:/WinSinga/dependencies/glog-0.3.5/src/windows"</span> ^ + -DGLOG_LIBRARIES<span class="o">=</span><span class="s2">"D:/WinSinga/dependencies/glog-0.3.5/x64/Release"</span> ^ + -DCBLAS_INCLUDE_DIR<span class="o">=</span><span class="s2">"D:/WinSinga/dependencies/openblas-0.2.20/lapack-netlib/CBLAS/include"</span> ^ + -DCBLAS_LIBRARIES<span class="o">=</span><span class="s2">"D:/WinSinga/dependencies/openblas-0.2.20/lib/RELEASE"</span> ^ + -DProtobuf_INCLUDE_DIR<span class="o">=</span><span class="s2">"D:/WinSinga/dependencies/protobuf-2.6.1/src"</span> ^ + -DProtobuf_LIBRARIES<span class="o">=</span><span class="s2">"D:\WinSinga/dependencies/protobuf-2.6.1/vsprojects/x64/Release"</span> ^ + -DProtobuf_PROTOC_EXECUTABLE<span class="o">=</span><span class="s2">"D:/WinSinga/dependencies/protoc-2.6.1-win32/protoc.exe"</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">"from singa import device; dev = device.create_cuda_gpu()"</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">"Visual Studio 15 2017 Win64"</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> + © 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
