Modified: incubator/singa/site/trunk/zh/docs/installation.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/zh/docs/installation.html?rev=1858059&r1=1858058&r2=1858059&view=diff ============================================================================== --- incubator/singa/site/trunk/zh/docs/installation.html (original) +++ incubator/singa/site/trunk/zh/docs/installation.html Wed Apr 24 14:57:35 2019 @@ -1,5 +1,5 @@ - + <!DOCTYPE html> <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> @@ -9,7 +9,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <title>å®è£ — incubator-singa 2.0.0 documentation</title> + <title>å®è£ — incubator-singa 1.1.0 documentation</title> @@ -38,18 +38,18 @@ <link rel="search" title="Search" href="../search.html" /> <link rel="next" title="è½¯ä»¶æ¶æ" href="software_stack.html" /> <link rel="prev" title="ææ¡£" href="index.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> - + <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> + </head> <body class="wy-body-for-nav"> @@ -216,12 +216,12 @@ <p>ç®åï¼SINGAæéç¨äºLinuxåMacOSXçconda软件å ï¼Python 2.7åPython 3.6ï¼ã 建议使ç¨<a class="reference external" href="https://conda.io/miniconda.html">Miniconda3</a>ä¸SINGAä¸èµ·ä½¿ç¨ãå®è£ å®minicondaåï¼æ§è¡ä»¥ä¸å½ä»¤ä¹ä¸æ¥å®è£ SINGAã</p> <ol> -<li><p class="first">CPUçæ¬</p> +<li><p>CPUçæ¬</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="n">conda</span> <span class="n">install</span> <span class="o">-</span><span class="n">c</span> <span class="n">nusdbsystem</span> <span class="n">singa</span><span class="o">-</span><span class="n">cpu</span> </pre></div> </div> </li> -<li><p class="first">ç±CUDAåcuDNNæ¯æçGPUçæ¬</p> +<li><p>ç±CUDAåcuDNNæ¯æçGPUçæ¬</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="n">conda</span> <span class="n">install</span> <span class="o">-</span><span class="n">c</span> <span class="n">nusdbsystem</span> <span class="n">singa</span><span class="o">-</span><span class="n">gpu</span> </pre></div> </div> @@ -278,29 +278,30 @@ æå ³å¨Ubuntu 16.04ä¸å®è£ å®ä»¬ç说æï¼ 请åé SINGA <a class="reference external" href="https://github.com/apache/incubator-singa/blob/master/tool/docker/">Dockerfiles</a>ã</p> <ul class="simple"> -<li>cmake (>=2.8)</li> -<li>gcc (>=4.8.1) or Clang</li> -<li>google protobuf (>=2.5)</li> -<li>blas (tested with openblas >=0.2.10)</li> -<li>swig(>=3.0.10) for compiling PySINGA</li> -<li>numpy(>=1.11.0) for compiling PySINGA</li> +<li><p>cmake (>=2.8)</p></li> +<li><p>gcc (>=4.8.1) or Clang</p></li> +<li><p>google protobuf (>=2.5)</p></li> +<li><p>blas (tested with openblas >=0.2.10)</p></li> +<li><p>swig(>=3.0.10) for compiling PySINGA</p></li> +<li><p>numpy(>=1.11.0) for compiling PySINGA</p></li> </ul> <ol class="simple"> -<li>å¨incubator-singaç®å½ä¸å建ä¸ä¸ª<code class="docutils literal notranslate"><span class="pre">build</span></code>æä»¶å¤¹å¹¶è¿å ¥å ¶ä¸</li> -<li>è¿è¡ <code class="docutils literal notranslate"><span class="pre">cmake</span> <span class="pre">[options]</span> <span class="pre">..</span></code> -é»è®¤æ åµä¸é¤äº<code class="docutils literal notranslate"><span class="pre">USE_PYTHON</span></code>ï¼å ¶ä»ææå¯é项齿¯OFF<ul> -<li><code class="docutils literal notranslate"><span class="pre">USE_MODULES=ON</span></code>, å½protobufåblas没æè¢«å®è£ æ¶ä½¿ç¨</li> -<li><code class="docutils literal notranslate"><span class="pre">USE_CUDA=ON</span></code>, å½CUDAåcuDNNå¯ç¨æ¶ä½¿ç¨</li> -<li><code class="docutils literal notranslate"><span class="pre">USE_PYTHON=ON</span></code>, ç¨äºç¼è¯PySINGA</li> -<li><code class="docutils literal notranslate"><span class="pre">USE_PYTHON3=ON</span></code>, ç¨äºæ¯æPython 3ç¼è¯ (é»è®¤çæ¯Python 2)</li> -<li><code class="docutils literal notranslate"><span class="pre">USE_OPENCL=ON</span></code>, ç¨äºæ¯æOpenCLç¼è¯</li> -<li><code class="docutils literal notranslate"><span class="pre">PACKAGE=ON</span></code>, ç¨äºå建Debianå </li> -<li><code class="docutils literal notranslate"><span class="pre">ENABLE_TEST</span></code>ï¼ç¨äºç¼è¯åå æµè¯ç¨ä¾</li> +<li><p>å¨incubator-singaç®å½ä¸å建ä¸ä¸ª<code class="docutils literal notranslate"><span class="pre">build</span></code>æä»¶å¤¹å¹¶è¿å ¥å ¶ä¸</p></li> +<li><p>è¿è¡ <code class="docutils literal notranslate"><span class="pre">cmake</span> <span class="pre">[options]</span> <span class="pre">..</span></code> +é»è®¤æ åµä¸é¤äº<code class="docutils literal notranslate"><span class="pre">USE_PYTHON</span></code>ï¼å ¶ä»ææå¯é项齿¯OFF</p> +<ul class="simple"> +<li><p><code class="docutils literal notranslate"><span class="pre">USE_MODULES=ON</span></code>, å½protobufåblas没æè¢«å®è£ æ¶ä½¿ç¨</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">USE_CUDA=ON</span></code>, å½CUDAåcuDNNå¯ç¨æ¶ä½¿ç¨</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">USE_PYTHON=ON</span></code>, ç¨äºç¼è¯PySINGA</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">USE_PYTHON3=ON</span></code>, ç¨äºæ¯æPython 3ç¼è¯ (é»è®¤çæ¯Python 2)</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">USE_OPENCL=ON</span></code>, ç¨äºæ¯æOpenCLç¼è¯</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">PACKAGE=ON</span></code>, ç¨äºå建Debianå </p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">ENABLE_TEST</span></code>ï¼ç¨äºç¼è¯åå æµè¯ç¨ä¾</p></li> </ul> </li> -<li>ç¼è¯ä»£ç ï¼ å¦ï¼ <code class="docutils literal notranslate"><span class="pre">make</span></code></li> -<li>è¿å ¥pythonæä»¶å¤¹</li> -<li>è¿è¡ <code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">.</span></code>æè <code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">-e</span> <span class="pre">.</span></code>ã第äºä¸ªæä»¤å建符å·é¾æ¥è䏿¯å°æä»¶å¤å¶å°pythonç«ç¹å æä»¶å¤¹ä¸ã</li> +<li><p>ç¼è¯ä»£ç ï¼ å¦ï¼ <code class="docutils literal notranslate"><span class="pre">make</span></code></p></li> +<li><p>è¿å ¥pythonæä»¶å¤¹</p></li> +<li><p>è¿è¡ <code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">.</span></code>æè <code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">-e</span> <span class="pre">.</span></code>ã第äºä¸ªæä»¤å建符å·é¾æ¥è䏿¯å°æä»¶å¤å¶å°pythonç«ç¹å æä»¶å¤¹ä¸ã</p></li> </ol> <p>å½USE_PYTHON=ONæ¶ï¼ç¬¬4æ¥å第5æ¥ç¨äºå®è£ PySINGAã</p> <p>å¨éè¿ENABLE_TEST=ONç¼è¯å¥½SINGAåï¼ä½ å¯ä»¥è¿è¡åå æµè¯</p> @@ -370,9 +371,9 @@ </div> <p>å¦å¤ï¼ä½ å°éè¦OpenCL Installable Client Driver (ICD)以å¨ä½ çå¹³å°ä¸è¿è¡OpenCLã</p> <ul class="simple"> -<li>对äºAMDåNvidia GPU, 驱å¨å è¿éè¦å 嫿£ç¡®çOpenCL ICDã</li> -<li>对äºè±ç¹å°CPUså/æGPUs, å¯ä»¥ä»<a class="reference external" href="https://software.intel.com/en-us/articles/opencl-drivers">è±ç¹å°å®ç½</a>ä¸è·åå°ã 注æï¼ å®ç½ä¸æä¾ç驱å¨ä» æ¯æè¿æçCPUsåGPUsã</li> -<li>å¯¹äºæ´èçè±ç¹å°CPUsï¼ä½ å¯ä»¥éç¨<code class="docutils literal notranslate"><span class="pre">beignet-opencl-icd</span></code>å ã</li> +<li><p>对äºAMDåNvidia GPU, 驱å¨å è¿éè¦å 嫿£ç¡®çOpenCL ICDã</p></li> +<li><p>对äºè±ç¹å°CPUså/æGPUs, å¯ä»¥ä»<a class="reference external" href="https://software.intel.com/en-us/articles/opencl-drivers">è±ç¹å°å®ç½</a>ä¸è·åå°ã 注æï¼ å®ç½ä¸æä¾ç驱å¨ä» æ¯æè¿æçCPUsåGPUsã</p></li> +<li><p>å¯¹äºæ´èçè±ç¹å°CPUsï¼ä½ å¯ä»¥éç¨<code class="docutils literal notranslate"><span class="pre">beignet-opencl-icd</span></code>å ã</p></li> </ul> <p>注æï¼å¨CPUä¸è¿è¡OpenCLç®åæ¯ä¸æ¨èçï¼å ä¸ºå¾æ ¢ã å åä¼ è¾æ¯ä»¥ç§ç级å«ï¼CPUä¸ä¸º1000 msï¼èGPUä¸ä¸º1毫ç§ï¼ã</p> <p>æ´å¤å ³äºOpenCLç¯å¢é ç½®çä¿¡æ¯å¯ä»¥ä»<a class="reference external" href="https://wiki.tiker.net/OpenCLHowTo">è¿é</a>è·å¾ã</p> @@ -397,15 +398,15 @@ <div class="section" id="faq"> <h2>FAQ<a class="headerlink" href="#faq" title="Permalink to this headline">¶</a></h2> <ul> -<li><p class="first">Q: å¨ä½¿ç¨ç±wheelå®è£ çPySINGA(âimport singaâ)æ¶ï¼åºç°é误ã</p> +<li><p>Q: å¨ä½¿ç¨ç±wheelå®è£ çPySINGA(âimport singaâ)æ¶ï¼åºç°é误ã</p> <p>A: 请æ¥ç<code class="docutils literal notranslate"><span class="pre">python</span> <span class="pre">-c</span> <span class="pre">"from</span> <span class="pre">singa</span> <span class="pre">import</span> <span class="pre">_singa_wrap"</span></code>详ç»é误æç¤ºã è¿ææ¶æ¯ç±ä¾èµåºé æçï¼æ¯å¦ï¼æå¤ä¸ªçæ¬çprotobufï¼cudnn缺失ï¼numpyçæ¬ä¸å¹é ã ä¸é¢çæ¥éª¤è¯¦è¿°äºä¸åçæ¡ä¾ï¼</p> <ol> -<li><p class="first">æ£æ¥cudnnï¼cudaågccçæ¬ï¼æ¨è使ç¨cudnn5ï¼cuda7.5ågcc4.8/4.9ã 妿gccæ¯5.0çæ¬ï¼ éè¦éä½çæ¬ã 妿cudnnç¡®å®æè ä¸wheelçæ¬ä¸å¹é ï¼ä½ å¯ä»¥å°æ£ç¡®çcudnnçæ¬ä¸è½½å°~/local/cudnn/ å¹¶ä¸</p> +<li><p>æ£æ¥cudnnï¼cudaågccçæ¬ï¼æ¨è使ç¨cudnn5ï¼cuda7.5ågcc4.8/4.9ã 妿gccæ¯5.0çæ¬ï¼ éè¦éä½çæ¬ã 妿cudnnç¡®å®æè ä¸wheelçæ¬ä¸å¹é ï¼ä½ å¯ä»¥å°æ£ç¡®çcudnnçæ¬ä¸è½½å°~/local/cudnn/ å¹¶ä¸</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span> $ echo "export LD_LIBRARY_PATH=/home/<yourname>/local/cudnn/lib64:$LD_LIBRARY_PATH" >> ~/.bashrc </pre></div> </div> </li> -<li><p class="first">妿æ¯protobufçé®é¢ï¼éè¦ä¸è½½ææ°ç<a class="reference external" href="https://issues.apache.org/jira/browse/SINGA-255">ç¼è¯è¿protobufåopenblasçwhlæä»¶</a>ã æè ï¼ä½ å¯ä»¥ä»æºç å®è£ protobufå°æå®æä»¶å¤¹ï¼æ¯å¦ï¼~/local/ï¼è§£åtaræä»¶ï¼ç¶åæ§è¡</p> +<li><p>妿æ¯protobufçé®é¢ï¼éè¦ä¸è½½ææ°ç<a class="reference external" href="https://issues.apache.org/jira/browse/SINGA-255">ç¼è¯è¿protobufåopenblasçwhlæä»¶</a>ã æè ï¼ä½ å¯ä»¥ä»æºç å®è£ protobufå°æå®æä»¶å¤¹ï¼æ¯å¦ï¼~/local/ï¼è§£åtaræä»¶ï¼ç¶åæ§è¡</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span> $ ./configure --prefix=/home/<yourname>local $ make && make install $ echo "export LD_LIBRARY_PATH=/home/<yourname>/local/lib:$LD_LIBRARY_PATH" >> ~/.bashrc @@ -413,9 +414,8 @@ </pre></div> </div> </li> -<li><p class="first">妿æ¾ä¸å°å ¶ä»pythonåºï¼ä½ å¯ä»¥ç¨pipæcondaå建pythonèæç¯å¢ã</p> -</li> -<li><p class="first">妿䏿¯ä»¥ä¸åå é æçï¼è¿å ¥<code class="docutils literal notranslate"><span class="pre">_singa_wrap.so</span></code>æå¨æä»¶å¤¹ï¼æ§è¡</p> +<li><p>妿æ¾ä¸å°å ¶ä»pythonåºï¼ä½ å¯ä»¥ç¨pipæcondaå建pythonèæç¯å¢ã</p></li> +<li><p>妿䏿¯ä»¥ä¸åå é æçï¼è¿å ¥<code class="docutils literal notranslate"><span class="pre">_singa_wrap.so</span></code>æå¨æä»¶å¤¹ï¼æ§è¡</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span> $ python >> import importlib >> importlib.import_module('_singa_wrap') @@ -431,33 +431,33 @@ </pre></div> </div> </li> -<li><p class="first">Q: è¿è¡<code class="docutils literal notranslate"><span class="pre">cmake</span> <span class="pre">..</span></code>æ¥éï¼æ¾ä¸å°ä¾èµåºã</p> +<li><p>Q: è¿è¡<code class="docutils literal notranslate"><span class="pre">cmake</span> <span class="pre">..</span></code>æ¥éï¼æ¾ä¸å°ä¾èµåºã</p> <p>A: å¦æä½ æ²¡æå®è£ ç¸åºåºï¼å°±å»å®è£ å®ä»¬ãå¦æä½ æè¿äºåºå®è£ å¨éç³»ç»é»è®¤çè·¯å¾ä¸ï¼å¦/usr/localï¼ä½ å¯ä»¥å°æ£ç¡®è·¯å¾å¯¼åºå°ç¯å¢åéä¸ï¼</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span> $ export CMAKE_INCLUDE_PATH=<path to your header file folder> $ export CMAKE_LIBRARY_PATH=<path to your lib file folder> </pre></div> </div> </li> -<li><p class="first">Q: <code class="docutils literal notranslate"><span class="pre">make</span></code>æ¥éï¼å¦è¿æ¥é¶æ®µ</p> +<li><p>Q: <code class="docutils literal notranslate"><span class="pre">make</span></code>æ¥éï¼å¦è¿æ¥é¶æ®µ</p> <p>A: å¦æä½ çåºæä»¶å¨éç³»ç»é»è®¤è·¯å¾ä¸ï¼ä½ éè¦å¯¼åºç¸åºçåé</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span> $ export LIBRARY_PATH=<path to your lib file folder> $ export LD_LIBRARY_PATH=<path to your lib file folder> </pre></div> </div> </li> -<li><p class="first">Q: 头æä»¶éè¯¯ï¼æ¯å¦ï¼âcblas.h no such file or directory existsâ</p> +<li><p>Q: 头æä»¶éè¯¯ï¼æ¯å¦ï¼âcblas.h no such file or directory existsâ</p> <p>A: ä½ éè¦æcblas.hçè·¯å¾å å ¥å°CPLUS_INCLUDE_PATHï¼å¦</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span> $ export CPLUS_INCLUDE_PATH=/opt/OpenBLAS/include:$CPLUS_INCLUDE_PATH </pre></div> </div> </li> -<li><p class="first">Q:ç¼è¯SINGAæ¶ï¼æåç°äºé误<code class="docutils literal notranslate"><span class="pre">SSE2</span> <span class="pre">instruction</span> <span class="pre">set</span> <span class="pre">not</span> <span class="pre">enabled</span></code></p> +<li><p>Q:ç¼è¯SINGAæ¶ï¼æåç°äºé误<code class="docutils literal notranslate"><span class="pre">SSE2</span> <span class="pre">instruction</span> <span class="pre">set</span> <span class="pre">not</span> <span class="pre">enabled</span></code></p> <p>A:ä½ å¯ä»¥å°è¯å¦ä¸å½ä»¤</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span> $ make CFLAGS='-msse2' CXXFLAGS='-msse2' </pre></div> </div> </li> -<li><p class="first">Q:彿è¯å¾å¯¼å ¥.pyæä»¶æ¶ï¼æå¾å°é误æç¤º<code class="docutils literal notranslate"><span class="pre">ImportError:</span> <span class="pre">cannot</span> <span class="pre">import</span> <span class="pre">name</span> <span class="pre">enum_type_wrapper</span></code>ã</p> +<li><p>Q:彿è¯å¾å¯¼å ¥.pyæä»¶æ¶ï¼æå¾å°é误æç¤º<code class="docutils literal notranslate"><span class="pre">ImportError:</span> <span class="pre">cannot</span> <span class="pre">import</span> <span class="pre">name</span> <span class="pre">enum_type_wrapper</span></code>ã</p> <p>A: ä½ éè¦å®è£ ç»å®å°pythonçprotobufï¼å¯ä»¥ç±å¦ä¸å½ä»¤å®è£ </p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span> $ sudo apt-get install protobuf </pre></div> @@ -470,7 +470,7 @@ </pre></div> </div> </li> -<li><p class="first">Q: 彿仿ºç å建OpenBLASæ¶ï¼è¢«åç¥éè¦Fortranç¼è¯å¨ã</p> +<li><p>Q: 彿仿ºç å建OpenBLASæ¶ï¼è¢«åç¥éè¦Fortranç¼è¯å¨ã</p> <p>A: ä½ å¯ä»¥ç¨å¦ä¸å½ä»¤ç¼è¯OpenBLAS</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span> $ make ONLY_CBLAS=1 </pre></div> @@ -480,7 +480,7 @@ </pre></div> </div> </li> -<li><p class="first">Q: 彿å建protocol bufferæ¶ï¼åºç°é误æç¤º<code class="docutils literal notranslate"><span class="pre">GLIBC++_3.4.20</span> <span class="pre">not</span> <span class="pre">found</span> <span class="pre">in</span> <span class="pre">/usr/lib64/libstdc++.so.6</span></code>ã</p> +<li><p>Q: 彿å建protocol bufferæ¶ï¼åºç°é误æç¤º<code class="docutils literal notranslate"><span class="pre">GLIBC++_3.4.20</span> <span class="pre">not</span> <span class="pre">found</span> <span class="pre">in</span> <span class="pre">/usr/lib64/libstdc++.so.6</span></code>ã</p> <p>A: è¿è¯´æè¿æ¥å¨æ¾å°äºlibstdc++.so.6ï¼ä½æ¯è¿ä¸ªåºå±äºä¸ä¸ªæ´èçæ¬çGCCç¼è¯å¨ã è¦ç¼è¯çç¨åºä¾èµäºå®ä¹å¨æ°çæ¬GCCä¸çlibstdc++åºï¼æä»¥è¿æ¥å¨å¿ 须被åç¥å¦ä½æ¾å°æ°ççå¯å ±äº«çlibstdc++åºã æç®åçå¤çæ¹æ³æ¯æ¾å°æ£ç¡®çlibstdc++åºï¼å¯¼åºå°LD_LIBRARY_PATHåéã æ¯å¦ï¼å¦æGLIBC++_3.4.20被åå¨å¦ä¸å½ä»¤çè¾åºä¸</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span> $ strings /usr/local/lib64/libstdc++.so.6|grep GLIBC++ </pre></div> @@ -490,7 +490,7 @@ </pre></div> </div> </li> -<li><p class="first">Q: 彿å建glogæ¶æ¥éï¼âsrc/logging_unittest.cc:83:20: error: âgflagsâ is not a namespace-nameâã</p> +<li><p>Q: 彿å建glogæ¶æ¥éï¼âsrc/logging_unittest.cc:83:20: error: âgflagsâ is not a namespace-nameâã</p> <p>A: è¿å¯è½æ¯ä½ è£ äºä¸ä¸ªä¸åå½å空é´çgflagsï¼æ¯å¦âgoogleâï¼æä»¥glogæ¾ä¸å°âgflagsâå½å空é´ã gflags䏿¯å建glogå¿ é¡»çï¼ æä»¥ä½ å¯ä»¥ä¿®æ¹configure.acæä»¶ä»¥å¿½ç¥gflagsã</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="mf">1.</span> <span class="n">cd</span> <span class="n">to</span> <span class="n">glog</span> <span class="n">src</span> <span class="n">directory</span> <span class="mf">2.</span> <span class="n">change</span> <span class="n">line</span> <span class="mi">125</span> <span class="n">of</span> <span class="n">configure</span><span class="o">.</span><span class="n">ac</span> <span class="n">to</span> <span class="s2">"AC_CHECK_LIB(gflags, main, ac_cv_have_libgflags=0, ac_cv_have_libgflags=0)"</span> @@ -499,16 +499,16 @@ </div> <p>ä¹åï¼ä½ å¯ä»¥éæ°å建glogã</p> </li> -<li><p class="first">Q: å½ä½¿ç¨èæç¯å¢æ¶ï¼æ¯æ¬¡æè¿è¡pip installé½ä¼éæ°å®è£ numpyã ç¶èï¼å¨<code class="docutils literal notranslate"><span class="pre">import</span> <span class="pre">numpy</span></code>æ¶ï¼numpyå¯è½å¹¶æ²¡æè¢«ä½¿ç¨ã</p> +<li><p>Q: å½ä½¿ç¨èæç¯å¢æ¶ï¼æ¯æ¬¡æè¿è¡pip installé½ä¼éæ°å®è£ numpyã ç¶èï¼å¨<code class="docutils literal notranslate"><span class="pre">import</span> <span class="pre">numpy</span></code>æ¶ï¼numpyå¯è½å¹¶æ²¡æè¢«ä½¿ç¨ã</p> <p>A: è¿å¯è½æ¯å 为å¨ä½¿ç¨èæç¯å¢æ¶ï¼<code class="docutils literal notranslate"><span class="pre">PYTHONPATH</span></code>被设置æäºç©ºä»¥é²æ¢ä¸èæç¯å¢ä¸çè·¯å¾åçå²çªã</p> </li> -<li><p class="first">Q: å½ä»æºç ç¼è¯PySINGAæ¶ï¼ä¼å 为缺失<numpy/objectarray.h>èåºç°ç¼è¯é误ã</p> +<li><p>Q: å½ä»æºç ç¼è¯PySINGAæ¶ï¼ä¼å 为缺失<numpy/objectarray.h>èåºç°ç¼è¯é误ã</p> <p>A: 请å®è£ numpyå¹¶ä¸éè¿å¦ä¸å½ä»¤å¯¼åºnumpy头æä»¶</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span> $ export CPLUS_INCLUDE_PATH=`python -c "import numpy; print numpy.get_include()"`:$CPLUS_INCLUDE_PATH </pre></div> </div> </li> -<li><p class="first">Q: å½å¨Mac OS Xä¸è¿è¡PySINGAæ¶ï¼æå¾å°äºé误信æ¯âFatal Python error: PyThreadState_Get: no current thread Abort trap: 6âã</p> +<li><p>Q: å½å¨Mac OS Xä¸è¿è¡PySINGAæ¶ï¼æå¾å°äºé误信æ¯âFatal Python error: PyThreadState_Get: no current thread Abort trap: 6âã</p> <p>A: è¿ä¸ªé误å¾å ¸åå°åºç°å¨å½ä½ ç³»ç»ä¸åå¨å¤ä¸ªçæ¬çpythonå¹¶ä¸ä½ æ¯éè¿pipå®è£ SINGAçï¼è¿ä¸ªé®é¢å¯ä»¥éè¿ç±condaå®è£ SINGAæ¥è§£å³ï¼ï¼ æ¯å¦ï¼ä¸ä¸ªæ¥èªäºOSï¼ä¸ä¸ªéè¿Homebrewå®è£ ã åSINGAè¿æ¥çPythonå¿ é¡»åPythonè§£æå¨æ¯åä¸ªçæ¬ãä½ å¯ä»¥éè¿which pythonæ¥æ¥çpythonè§£æå¨çæ¬ï¼å¹¶éè¿otool -L <path to _singa_wrap.so>æ£æ¥åPySINGAè¿æ¥çPythonçæ¬ã 为äºè§£å³è¿ä¸ªé®é¢ï¼ éè¦ç¨æ£ç¡®çPythonçæ¬æ¥ç¼è¯SINGAã ç¹å«å°ï¼å¦æä½ 仿ºç å建çPySINGAï¼å½å¤èµ·<a class="reference external" href="http://stackoverflow.com/questions/15291500/i-have-2-versions-of-python-installed-but-cmake-is-using-older-version-how-do">cmake</a>æ¶ä½ é è¦æå®å®è£ è·¯å¾</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span> $ cmake -DPYTHON_LIBRARY=`python-config --prefix`/lib/libpython2.7.dylib -DPYTHON_INCLUDE_DIR=`python-config --prefix`/include/python2.7/ .. @@ -567,50 +567,46 @@ SINGAçï¼è¿ä¸ªé®é¢� + +<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/apache/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> + - <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="../../index.html">English</a></dd> - <dd><a href=".././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://www.apache.org" style="color:lightblue;padding: 5px; font-size: 10px; text-align: center; text-decoration: none; margin: 5px 2px;">Foundation</a> - <a href="http://www.apache.org/events/current-event" style="color:lightblue;padding: 5px; font-size: 10px; text-align: center; text-decoration: none; margin: 5px 2px;">Events</a> - <a href="http://www.apache.org/foundation/thanks.html" style="color:lightblue;padding: 5px; font-size: 10px; text-align: center; text-decoration: none; margin: 5px 2px;">Thanks</a> - <a href="http://www.apache.org/foundation/sponsorship.html" style="color:lightblue;padding: 5px; font-size: 10px; text-align: center; text-decoration: none; margin: 5px 2px;">Sponsorship</a> - <a href="http://www.apache.org/licenses/" style="color:lightblue;padding: 5px; font-size: 10px; text-align: center; text-decoration: none; margin: 5px 2px;">License</a> - <br> - <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/apache/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
Modified: incubator/singa/site/trunk/zh/docs/layer.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/zh/docs/layer.html?rev=1858059&r1=1858058&r2=1858059&view=diff ============================================================================== --- incubator/singa/site/trunk/zh/docs/layer.html (original) +++ incubator/singa/site/trunk/zh/docs/layer.html Wed Apr 24 14:57:35 2019 @@ -1,5 +1,5 @@ - + <!DOCTYPE html> <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> @@ -9,7 +9,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <title>å±(Layer) — incubator-singa 2.0.0 documentation</title> + <title>å±(Layer) — incubator-singa 1.1.0 documentation</title> @@ -38,18 +38,18 @@ <link rel="search" title="Search" href="../search.html" /> <link rel="next" title="åé¦ç½ç»" href="net.html" /> <link rel="prev" title="å¼ é(Tensor)" href="tensor.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> - + <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> + </head> <body class="wy-body-for-nav"> @@ -284,14 +284,14 @@ <p>Pythonå±çåºç±»ã å ¸åå°ï¼å±å®ä¾ççå½å¨æå æ¬ï¼</p> <ol class="simple"> -<li>æé 屿²¡æinput_sample_shapesï¼è½¬å°2;ç¨input_sample_shapesæå»ºå±ï¼è½¬å°3</li> -<li>è°ç¨setupæ¥åå»ºåæ°å¹¶è®¾ç½®å ¶ä»å åæ®µ</li> -<li>è°ç¨ååä¼ ææè®¿é®å±æå</li> -<li>è°ç¨ååä¼ æå¹¶è·ååæ°å®ææ´æ°</li> +<li><p>æé 屿²¡æinput_sample_shapesï¼è½¬å°2;ç¨input_sample_shapesæå»ºå±ï¼è½¬å°3</p></li> +<li><p>è°ç¨setupæ¥åå»ºåæ°å¹¶è®¾ç½®å ¶ä»å åæ®µ</p></li> +<li><p>è°ç¨ååä¼ ææè®¿é®å±æå</p></li> +<li><p>è°ç¨ååä¼ æå¹¶è·ååæ°å®ææ´æ°</p></li> </ol> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>name (str)</strong> â å±å</li> +<li><p><strong>name (str)</strong> â å±å</p></li> </ul> <hr class="docutils" /> <div class="section" id="setup-in-shapes"> @@ -299,7 +299,7 @@ <p>è°ç¨C++setup彿°åå»ºåæ°å¹¶è®¾ç½®å æ°æ®ã</p> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>in_shapes</strong> â 妿屿¥åå个è¾å ¥tensorï¼åin_shapesæ¯æå®è¾å ¥tensorå½¢ç¶çå个å ç»; å¦æè¯¥å±æ¥åå¤ä¸ªè¾å ¥tensorï¼ä¾å¦ï¼concatenationå±ï¼ï¼åin_shapesæ¯å ç»çå ç»ï¼æ¯ä¸ªå ç»å¯¹äºä¸ä¸ªè¾å ¥tensor</li> +<li><p><strong>in_shapes</strong> â 妿屿¥åå个è¾å ¥tensorï¼åin_shapesæ¯æå®è¾å ¥tensorå½¢ç¶çå个å ç»; å¦æè¯¥å±æ¥åå¤ä¸ªè¾å ¥tensorï¼ä¾å¦ï¼concatenationå±ï¼ï¼åin_shapesæ¯å ç»çå ç»ï¼æ¯ä¸ªå ç»å¯¹äºä¸ä¸ªè¾å ¥tensor</p></li> </ul> </div> <hr class="docutils" /> @@ -331,8 +331,8 @@ <p>å½åå±çååä¼ æã</p> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>flag</strong> â True (kTrain) for training (kEval); False for evaluating; other values for furture use.</li> -<li><strong>x (Tensor or list<Tensor>)</strong> â an input tensor if the layer is connected from a single layer; a list of tensors if the layer is connected from multiple layers.</li> +<li><p><strong>flag</strong> â True (kTrain) for training (kEval); False for evaluating; other values for furture use.</p></li> +<li><p><strong>x (Tensor or list<Tensor>)</strong> â an input tensor if the layer is connected from a single layer; a list of tensors if the layer is connected from multiple layers.</p></li> </ul> <p><strong>è¿åå¼ï¼</strong> å¦æè¯¥å±è¢«è¿æ¥å¨ä¸ä¸ªåç¬çå±åè¿åtensorï¼å¦æè¢«è¿æ¥å°å¤ä¸ªå±ï¼åè¿åä¸ä¸ªtensorå表</p> </div> @@ -342,8 +342,8 @@ <p>å½åå±çååä¼ æã</p> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>flag (int)</strong> â ä¿ç为以å使ç¨</li> -<li><strong>dy (Tensor or list<Tensor>)</strong> â ä¸ç®æ æå¤±ç¸å¯¹åºç梯度tensor</li> +<li><p><strong>flag (int)</strong> â ä¿ç为以å使ç¨</p></li> +<li><p><strong>dy (Tensor or list<Tensor>)</strong> â ä¸ç®æ æå¤±ç¸å¯¹åºç梯度tensor</p></li> </ul> <p><strong>è¿åå¼ï¼</strong> <dx, <dp1, dp2..>>ï¼dxæ¯è¾å ¥xçæ¢¯åº¦ï¼dpiæ¯ç¬¬iä¸ªåæ°çæ¢¯åº¦</p> </div> @@ -353,7 +353,7 @@ <p>å°å±ç¶ætensorç§»è³æå®è®¾å¤ã</p> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>device</strong> â swig转æ¢ç设å¤ï¼ç±singa.deviceå建</li> +<li><p><strong>device</strong> â swig转æ¢ç设å¤ï¼ç±singa.deviceå建</p></li> </ul> </div> </div> @@ -378,18 +378,18 @@ <p>å建ä¸ä¸ªå±å2Då·ç§¯ã</p> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>nb_kernels (int)</strong> â è¾å ¥tensorçééï¼æ ¸ï¼æ°</li> -<li><strong>kernel</strong> â ä¸ä¸ªæä¸å¯¹æ´åæ°è¡¨ç¤ºæ ¸çé«å宽</li> -<li><strong>stride</strong> â ä¸ä¸ªæä¸å¯¹æ´åæ°è¡¨ç¤ºæ¥é¿çé«å宽</li> -<li><strong>border_mode (string)</strong> â å¡«å æ¨¡å¼ï¼ä¸åºå大å°åï¼âvalidâ -> å¨é«å宽é¿åº¦ä¸è¡¥0 âsameâ -> å¡«å æ ¸ä¸åï¼ä¸åæ´ï¼æ°ç®ç0ï¼æ ¸å¿ é¡»æ¯å¥æ°</li> -<li><strong>cudnn_prefer (string)</strong> â å好çcudnnå·ç§¯ç®æ³ï¼å¯ä»¥æ¯âfatestâ, âautotuneâ, âlimited_workspaceâåâno_workspaceâ</li> -<li><strong>data_format (string)</strong> â âNCHWâæâNHWCâ</li> -<li><strong>use_bias (bool)</strong> â TrueæFalse</li> -<li><strong>pad</strong> â ä¸ä¸ªæä¸å¯¹æ´åæ°è¡¨ç¤ºå¡«å çé«å宽</li> -<li><strong>W_specs (dict)</strong> â ç¨äºæå®æéç©éµçè§æ ¼ï¼åæ®µå æ¬ä»£è¡¨åæ°åç§°çânameâï¼ä»£è¡¨å¦ä¹ éç乿°çâlr_multï¼ä»£è¡¨æéè¡°å乿°çââdecay_multâï¼ä»£è¡¨åå§åæ¹æ³çâinitâï¼å ¶å¯ä»¥æ¯âgaussianâï¼âuniformâï¼â xavierâï¼ç¸åºçåå§åæ¹æ³ä¸ºâââstdâï¼âmeanâï¼âhighâï¼âlowâãTODOï¼wangweiï¼âclampâ为æ¸å约æï¼value为æ éï¼âregularizerâ为æ£è§åï¼ç®åæ¯æâl2â</li> -<li><strong>b_specs (dict)</strong> â åç§»åéçè¶ åæ°ï¼åW_specs类似</li> -<li><strong>name (string)</strong> â å±å</li> -<li><strong>input_sample_shape</strong> â ç¨äºè¾å ¥tensorå½¢ç¶çä¸å ç»ï¼ä¾å¦ï¼ééï¼é«åº¦ï¼å®½åº¦ï¼æï¼é«åº¦ï¼å®½åº¦ï¼ééï¼</li> +<li><p><strong>nb_kernels (int)</strong> â è¾å ¥tensorçééï¼æ ¸ï¼æ°</p></li> +<li><p><strong>kernel</strong> â ä¸ä¸ªæä¸å¯¹æ´åæ°è¡¨ç¤ºæ ¸çé«å宽</p></li> +<li><p><strong>stride</strong> â ä¸ä¸ªæä¸å¯¹æ´åæ°è¡¨ç¤ºæ¥é¿çé«å宽</p></li> +<li><p><strong>border_mode (string)</strong> â å¡«å æ¨¡å¼ï¼ä¸åºå大å°åï¼âvalidâ -> å¨é«å宽é¿åº¦ä¸è¡¥0 âsameâ -> å¡«å æ ¸ä¸åï¼ä¸åæ´ï¼æ°ç®ç0ï¼æ ¸å¿ é¡»æ¯å¥æ°</p></li> +<li><p><strong>cudnn_prefer (string)</strong> â å好çcudnnå·ç§¯ç®æ³ï¼å¯ä»¥æ¯âfatestâ, âautotuneâ, âlimited_workspaceâåâno_workspaceâ</p></li> +<li><p><strong>data_format (string)</strong> â âNCHWâæâNHWCâ</p></li> +<li><p><strong>use_bias (bool)</strong> â TrueæFalse</p></li> +<li><p><strong>pad</strong> â ä¸ä¸ªæä¸å¯¹æ´åæ°è¡¨ç¤ºå¡«å çé«å宽</p></li> +<li><p><strong>W_specs (dict)</strong> â ç¨äºæå®æéç©éµçè§æ ¼ï¼åæ®µå æ¬ä»£è¡¨åæ°åç§°çânameâï¼ä»£è¡¨å¦ä¹ éç乿°çâlr_multï¼ä»£è¡¨æéè¡°å乿°çââdecay_multâï¼ä»£è¡¨åå§åæ¹æ³çâinitâï¼å ¶å¯ä»¥æ¯âgaussianâï¼âuniformâï¼â xavierâï¼ç¸åºçåå§åæ¹æ³ä¸ºâââstdâï¼âmeanâï¼âhighâï¼âlowâãTODOï¼wangweiï¼âclampâ为æ¸å约æï¼value为æ éï¼âregularizerâ为æ£è§åï¼ç®åæ¯æâl2â</p></li> +<li><p><strong>b_specs (dict)</strong> â åç§»åéçè¶ åæ°ï¼åW_specs类似</p></li> +<li><p><strong>name (string)</strong> â å±å</p></li> +<li><p><strong>input_sample_shape</strong> â ç¨äºè¾å ¥tensorå½¢ç¶çä¸å ç»ï¼ä¾å¦ï¼ééï¼é«åº¦ï¼å®½åº¦ï¼æï¼é«åº¦ï¼å®½åº¦ï¼ééï¼</p></li> </ul> </div> <hr class="docutils" /> @@ -410,7 +410,7 @@ ææçåæ°é½ä¸Conv2Dç¸åï¼é¤äºä¸é¢çåæ°ã</p> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>mode</strong> â æ± 忍¡å¼ï¼model_pb2.PoolingConf.MAXæmodel_pb2.PoolingConf.AVE</li> +<li><p><strong>mode</strong> â æ± 忍¡å¼ï¼model_pb2.PoolingConf.MAXæmodel_pb2.PoolingConf.AVE</p></li> </ul> </div> <hr class="docutils" /> @@ -442,11 +442,11 @@ <p>æ¹éæ£ååã</p> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>momentum (float)</strong> â ç¨äºè¿è¡çåå¼åæ¹å·®</li> -<li><strong>beta_specs (dict)</strong> â åå ¸ï¼å æ¬betaåæ°çåæ®µï¼ânameâåæ°åç§°âï¼lr_multâå¦ä¹ éç乿°ï¼âdecay_multâæéè¡°å乿°ï¼âinitâåå§åæ¹æ³ï¼å¯ä»¥æ¯âgaussianâï¼âuniformâåâxavierâï¼âstdâï¼âmeanâï¼âhighâï¼âlowâ表示ç¸åºåå§åæ¹æ³ï¼âclampâ表示梯度约æï¼å¼æ¯æ éï¼âregularizerâç¨äºæ£ååï¼ç®åæ¯æâl2â</li> -<li><strong>gamma_specs (dict)</strong> â åbeta_specs类似, ä½ç¨äºgammaåæ°.</li> -<li><strong>name (string)</strong> â å±å</li> -<li><strong>input_sample_shape (tuple)</strong> â æ´åæ°ï¼è³å°ä¸ä¸ª</li> +<li><p><strong>momentum (float)</strong> â ç¨äºè¿è¡çåå¼åæ¹å·®</p></li> +<li><p><strong>beta_specs (dict)</strong> â åå ¸ï¼å æ¬betaåæ°çåæ®µï¼ânameâåæ°åç§°âï¼lr_multâå¦ä¹ éç乿°ï¼âdecay_multâæéè¡°å乿°ï¼âinitâåå§åæ¹æ³ï¼å¯ä»¥æ¯âgaussianâï¼âuniformâåâxavierâï¼âstdâï¼âmeanâï¼âhighâï¼âlowâ表示ç¸åºåå§åæ¹æ³ï¼âclampâ表示梯度约æï¼å¼æ¯æ éï¼âregularizerâç¨äºæ£ååï¼ç®åæ¯æâl2â</p></li> +<li><p><strong>gamma_specs (dict)</strong> â åbeta_specs类似, ä½ç¨äºgammaåæ°.</p></li> +<li><p><strong>name (string)</strong> â å±å</p></li> +<li><p><strong>input_sample_shape (tuple)</strong> â æ´åæ°ï¼è³å°ä¸ä¸ª</p></li> </ul> </div> <hr class="docutils" /> @@ -456,9 +456,9 @@ <p>å±é¨ååºå½ä¸åã</p> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>size (int)</strong> â ç¨äºå½ä¸åçééæ°.</li> -<li><strong>mode (string)</strong> â âcross_channelâ</li> -<li><strong>input_sample_shape (tuple)</strong> â 3ç»´å ç»ï¼(channel, height, width)</li> +<li><p><strong>size (int)</strong> â ç¨äºå½ä¸åçééæ°.</p></li> +<li><p><strong>mode (string)</strong> â âcross_channelâ</p></li> +<li><p><strong>input_sample_shape (tuple)</strong> â 3ç»´å ç»ï¼(channel, height, width)</p></li> </ul> </div> <hr class="docutils" /> @@ -468,12 +468,12 @@ <p>è¿è¡çº¿æ§ææ¾å°åæ¢ï¼ä¹è¢«å«åå 积æå ¨è¿æ¥å±ã</p> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>num_output (int)</strong> â è¾åºç¹å¾é¿åº¦</li> -<li><strong>use_bias (bool)</strong> â 转æ¢åçç¹å¾å鿝å¦å ä¸åç§»åé</li> -<li><strong>W_specs (dict)</strong> â å 嫿å¼ç©éµçåæ®µï¼ânameâåæ°åç§°âï¼lr_multâå¦ä¹ éç乿°ï¼âdecay_multâæéè¡°å乿°ï¼âinitâåå§åæ¹æ³ï¼å¯ä»¥æ¯âgaussianâï¼âuniformâåâxavierâï¼âstdâï¼âmeanâï¼âhighâï¼âlowâ表示ç¸åºåå§åæ¹æ³ï¼âclampâ表示梯度约æï¼å¼æ¯æ éï¼âregularizerâç¨äºæ£ååï¼ç®åæ¯æâl2â</li> -<li><strong>b_specs (dict)</strong> â åç§»åéçåæ®µ, åW_specs类似</li> -<li><strong>W_transpose (bool)</strong> â å¦æä¸ºçï¼è¾åºä¸ºx*W.T+b</li> -<li><strong>input_sample_shape (tuple)</strong> â è¾å ¥ç¹å¾é¿åº¦</li> +<li><p><strong>num_output (int)</strong> â è¾åºç¹å¾é¿åº¦</p></li> +<li><p><strong>use_bias (bool)</strong> â 转æ¢åçç¹å¾å鿝å¦å ä¸åç§»åé</p></li> +<li><p><strong>W_specs (dict)</strong> â å 嫿å¼ç©éµçåæ®µï¼ânameâåæ°åç§°âï¼lr_multâå¦ä¹ éç乿°ï¼âdecay_multâæéè¡°å乿°ï¼âinitâåå§åæ¹æ³ï¼å¯ä»¥æ¯âgaussianâï¼âuniformâåâxavierâï¼âstdâï¼âmeanâï¼âhighâï¼âlowâ表示ç¸åºåå§åæ¹æ³ï¼âclampâ表示梯度约æï¼å¼æ¯æ éï¼âregularizerâç¨äºæ£ååï¼ç®åæ¯æâl2â</p></li> +<li><p><strong>b_specs (dict)</strong> â åç§»åéçåæ®µ, åW_specs类似</p></li> +<li><p><strong>W_transpose (bool)</strong> â å¦æä¸ºçï¼è¾åºä¸ºx*W.T+b</p></li> +<li><p><strong>input_sample_shape (tuple)</strong> â è¾å ¥ç¹å¾é¿åº¦</p></li> </ul> </div> <hr class="docutils" /> @@ -483,8 +483,8 @@ <p>Dropoutå±</p> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>p (float)</strong> â éæºä¸¢æä¸ä¸ªå ç´ ï¼å³å°å ¶ä¸è®¾ä¸º0ï¼çæ¦ç</li> -<li><strong>name (string)</strong> â å±å</li> +<li><p><strong>p (float)</strong> â éæºä¸¢æä¸ä¸ªå ç´ ï¼å³å°å ¶ä¸è®¾ä¸º0ï¼çæ¦ç</p></li> +<li><p><strong>name (string)</strong> â å±å</p></li> </ul> </div> <hr class="docutils" /> @@ -494,9 +494,9 @@ <p>æ¿å±å±</p> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>name (string)</strong> â å±å</li> -<li><strong>mode (string)</strong> â âreluâ, âsigmoidâæ âtanhâ</li> -<li><strong>input_sample_shape (tuple)</strong> â åä¸ªæ ·æ¬çå½¢ç¶</li> +<li><p><strong>name (string)</strong> â å±å</p></li> +<li><p><strong>mode (string)</strong> â âreluâ, âsigmoidâæ âtanhâ</p></li> +<li><p><strong>input_sample_shape (tuple)</strong> â åä¸ªæ ·æ¬çå½¢ç¶</p></li> </ul> </div> <hr class="docutils" /> @@ -506,8 +506,8 @@ <p>éç¨SoftMaxã</p> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>axis (int)</strong> â 对[axis, -1)çæ°æ®é个è¿è¡SoftMax</li> -<li><strong>input_sample_shape (tuple)</strong> â åä¸ªæ ·æ¬çå½¢ç¶</li> +<li><p><strong>axis (int)</strong> â 对[axis, -1)çæ°æ®é个è¿è¡SoftMax</p></li> +<li><p><strong>input_sample_shape (tuple)</strong> â åä¸ªæ ·æ¬çå½¢ç¶</p></li> </ul> </div> <hr class="docutils" /> @@ -517,8 +517,8 @@ <p>å°è¾å ¥tensoréå¡ä¸ºä¸ä¸ªç©éµã</p> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>axis (int)</strong> â æ ¹æ®æå®ç»´åº¦å°è¾å ¥éå¡ä¸ºç©éµï¼[0,axis)ä½ä¸ºè¡ï¼[axis, -1)ä½ä¸ºå</li> -<li><strong>input_sample_shape (tuple)</strong> â åä¸ªæ ·æ¬çå½¢ç¶</li> +<li><p><strong>axis (int)</strong> â æ ¹æ®æå®ç»´åº¦å°è¾å ¥éå¡ä¸ºç©éµï¼[0,axis)ä½ä¸ºè¡ï¼[axis, -1)ä½ä¸ºå</p></li> +<li><p><strong>input_sample_shape (tuple)</strong> â åä¸ªæ ·æ¬çå½¢ç¶</p></li> </ul> </div> <hr class="docutils" /> @@ -528,7 +528,7 @@ <p>对ææè¾å ¥tensoræ±åã</p> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>input_sample_shape</strong> â è¾å ¥æ ·æ¬çå½¢ç¶ãæææ ·æ¬çå½¢ç¶åºè¯¥ä¸è´ã</li> +<li><p><strong>input_sample_shape</strong> â è¾å ¥æ ·æ¬çå½¢ç¶ãæææ ·æ¬çå½¢ç¶åºè¯¥ä¸è´ã</p></li> </ul> <div class="section" id="setup-in-shape"> <h4>setup(in_shape)<a class="headerlink" href="#setup-in-shape" title="Permalink to this headline">¶</a></h4> @@ -547,7 +547,7 @@ TODO(wangwei) å ç´ çº§å«ç <p>å¤å¶æ¯ä¸ªè¾å ¥å±ç梯度tensorã</p> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>grad</strong> - 梯度tensor</li> +<li><p><strong>grad</strong> - 梯度tensor</p></li> </ul> <p><strong>è¿åå¼ï¼</strong> tensoråè¡¨ï¼æ¯ä¸ªè¾å ¥å±å¯¹åºå ¶ä¸ä¸ä¸ª</p> </div> @@ -559,8 +559,8 @@ TODO(wangwei) å ç´ çº§å«ç <p>çæè¾å ¥tensorçå¤ä¸ªå¯æ¬ã</p> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>num_output (int)</strong> â å¾ çæçè¾åºtensoræ°ç®</li> -<li><strong>input_sample_shape()</strong> â å å«ä¸ä¸ªæ´åæ°ï¼ä»£è¡¨è¾å ¥æ ·æ¬ç¹å¾å¤§å°</li> +<li><p><strong>num_output (int)</strong> â å¾ çæçè¾åºtensoræ°ç®</p></li> +<li><p><strong>input_sample_shape()</strong> â å å«ä¸ä¸ªæ´åæ°ï¼ä»£è¡¨è¾å ¥æ ·æ¬ç¹å¾å¤§å°</p></li> </ul> <div class="section" id="id4"> <h4>setup(in_shape)<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h4> @@ -573,8 +573,8 @@ TODO(wangwei) å ç´ çº§å«ç <p>çæè¾å ¥tensorçå¤ä¸ªå¯æ¬ã</p> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>flag</strong> â æ²¡æç¨å°</li> -<li><strong>input</strong> â å个è¾å ¥tensor</li> +<li><p><strong>flag</strong> â æ²¡æç¨å°</p></li> +<li><p><strong>input</strong> â å个è¾å ¥tensor</p></li> </ul> <p><strong>è¿åå¼ï¼</strong> è¾åºtensoråè¡¨ï¼æ¯ä¸ªå¯¹åºè¾å ¥çä¸ä¸ªæ·è´</p> </div> @@ -583,7 +583,7 @@ TODO(wangwei) å ç´ çº§å«ç <p>对ææè¾å ¥tensoræ±åå¾å°å个è¾åºtensorã</p> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>grad</strong> - 梯度tensor</li> +<li><p><strong>grad</strong> - 梯度tensor</p></li> </ul> <p><strong>è¿åå¼ï¼</strong> ä¸ä¸ªtensorï¼ä»£è¡¨ææè¾å ¥æ¢¯åº¦tensorçæ±å</p> </div> @@ -595,16 +595,16 @@ TODO(wangwei) å ç´ çº§å«ç <p>å°tensorç«ç´(axis=0)ææ°´å¹³(axis=1)æ¼æ¥ãç®åä» æ¯æ2ç»´tensorã</p> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>axis (int)</strong> â 0è¡¨ç¤ºæ¼æ¥è¡; 1è¡¨ç¤ºæ¼æ¥å;</li> -<li><strong>input_sample_shapes</strong> â æ ·æ¬å½¢ç¶çå ç»åè¡¨ï¼æ¯ä¸ªå¯¹åºä¸ä¸ªè¾å ¥æ ·æ¬çtensor</li> +<li><p><strong>axis (int)</strong> â 0è¡¨ç¤ºæ¼æ¥è¡; 1è¡¨ç¤ºæ¼æ¥å;</p></li> +<li><p><strong>input_sample_shapes</strong> â æ ·æ¬å½¢ç¶çå ç»åè¡¨ï¼æ¯ä¸ªå¯¹åºä¸ä¸ªè¾å ¥æ ·æ¬çtensor</p></li> </ul> <div class="section" id="id6"> <h4>forward(flag, inputs)<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h4> <p>æ¼æ¥ææè¾å ¥tensorã</p> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>flag</strong> â åLayer::forward()</li> -<li><strong>input</strong> â tensorå表</li> +<li><p><strong>flag</strong> â åLayer::forward()</p></li> +<li><p><strong>input</strong> â tensorå表</p></li> </ul> <p><strong>è¿åå¼ï¼</strong> ä¸ä¸ªæ¼æ¥åçtensor</p> </div> @@ -612,8 +612,8 @@ TODO(wangwei) å ç´ çº§å«ç <h4>backward(flag, dy)<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h4> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>flag</strong> â same as Layer::backward()</li> -<li><strong>dy (Tensor)</strong> â the gradient tensors of y w.r.t objective loss</li> +<li><p><strong>flag</strong> â same as Layer::backward()</p></li> +<li><p><strong>dy (Tensor)</strong> â the gradient tensors of y w.r.t objective loss</p></li> </ul> <p><strong>è¿åå¼ï¼</strong> å ç»(dx, []), dxæ¯tensorå表ï¼å¯¹åºè¾å ¥ç梯度ï¼[]æ¯ç©ºå表</p> </div> @@ -625,9 +625,9 @@ TODO(wangwei) å ç´ çº§å«ç <p>å°è¾å ¥tensor沿ç«ç´(axis=0)ææ°´å¹³(axis=1)åæå¤ä¸ªåtensorã</p> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>axis (int)</strong> â 0代表åå²è¡; 1代表åå²å;</li> -<li><strong>slice_point (list)</strong> â æ²¿çè½´åå²çä½ç½®ï¼n-1个åå²ç¹å¯¹åºn个åtensorï¼</li> -<li><strong>input_sample_shape</strong> â è¾å ¥æ ·æ¬tensorçå½¢ç¶</li> +<li><p><strong>axis (int)</strong> â 0代表åå²è¡; 1代表åå²å;</p></li> +<li><p><strong>slice_point (list)</strong> â æ²¿çè½´åå²çä½ç½®ï¼n-1个åå²ç¹å¯¹åºn个åtensorï¼</p></li> +<li><p><strong>input_sample_shape</strong> â è¾å ¥æ ·æ¬tensorçå½¢ç¶</p></li> </ul> <div class="section" id="id8"> <h4>get_output_sample_shape()<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h4> @@ -637,8 +637,8 @@ TODO(wangwei) å ç´ çº§å«ç <p>沿ç»å®è½´åå²è¾å ¥tensorã</p> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>flag</strong> â åLayer::forward()</li> -<li><strong>x</strong> â å个è¾å ¥tensor</li> +<li><p><strong>flag</strong> â åLayer::forward()</p></li> +<li><p><strong>x</strong> â å个è¾å ¥tensor</p></li> </ul> <p><strong>è¿åå¼ï¼</strong> è¾åºtensorå表</p> </div> @@ -647,9 +647,9 @@ TODO(wangwei) å ç´ çº§å«ç <p>æ¼æ¥æææ¢¯åº¦tensor以çæä¸ä¸ªè¾åºtensorã</p> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>flag</strong> â åLayer::backward()</li> -<li><strong>grads</strong> â tensoråè¡¨ï¼æ¯ä¸ªå¯¹åºä¸ä¸ªåå²ç梯度tensor -<strong>è¿åå¼ï¼</strong> å ç»(dx, []), dxæ¯ä¸ä¸ªtensorï¼å¯¹åºåå§è¾å ¥ç梯度ï¼[]æ¯ç©ºå表</li> +<li><p><strong>flag</strong> â åLayer::backward()</p></li> +<li><p><strong>grads</strong> â tensoråè¡¨ï¼æ¯ä¸ªå¯¹åºä¸ä¸ªåå²ç梯度tensor +<strong>è¿åå¼ï¼</strong> å ç»(dx, []), dxæ¯ä¸ä¸ªtensorï¼å¯¹åºåå§è¾å ¥ç梯度ï¼[]æ¯ç©ºå表</p></li> </ul> </div> </div> @@ -660,29 +660,29 @@ TODO(wangwei) å ç´ çº§å«ç <p>éå½å±å å«4个åå ï¼å³lstm, gru, tanhåreluã</p> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>hidden_size</strong> â éå«å±ç¹å¾å¤§å°ï¼åææå±çå æ ã</li> -<li><strong>rnn_mode</strong> â å³å®äºRNNåå ï¼å¯ä»¥æ¯âlstmâ, âgruâ, âtanhâå âreluâãå¯¹äºæ¯ç§æ¨¡å¼ï¼å¯ä»¥åècudnnæåã</li> -<li><strong>num_stacks</strong> â rnnå±çå æ æ°éãè¿ä¸åäºéè¦å±å¼çåºåé¿åº¦ã</li> -<li><strong>input_mode</strong> â âlinearâï¼éè¿çº¿æ§åæ¢å°è¾å ¥ç¹å¾xè½¬æ¢æå¤§å°ä¸ºhidden_sizeçç¹å¾åéï¼âskipâï¼ä» è¦æ±è¾å ¥ç¹å¾å¤§å°çäºhidden_sizeã</li> -<li><strong>bidirection</strong> â 对äºååRNN为çã</li> -<li><strong>param_specs</strong> â RNNåæ°çåå§åé ç½®ã</li> -<li><strong>input_sample_shape</strong> â å å«ä¸ä¸ªæ´åæ°ï¼ä»£è¡¨è¾å ¥æ ·æ¬çç¹å¾å¤§å°ã</li> +<li><p><strong>hidden_size</strong> â éå«å±ç¹å¾å¤§å°ï¼åææå±çå æ ã</p></li> +<li><p><strong>rnn_mode</strong> â å³å®äºRNNåå ï¼å¯ä»¥æ¯âlstmâ, âgruâ, âtanhâå âreluâãå¯¹äºæ¯ç§æ¨¡å¼ï¼å¯ä»¥åècudnnæåã</p></li> +<li><p><strong>num_stacks</strong> â rnnå±çå æ æ°éãè¿ä¸åäºéè¦å±å¼çåºåé¿åº¦ã</p></li> +<li><p><strong>input_mode</strong> â âlinearâï¼éè¿çº¿æ§åæ¢å°è¾å ¥ç¹å¾xè½¬æ¢æå¤§å°ä¸ºhidden_sizeçç¹å¾åéï¼âskipâï¼ä» è¦æ±è¾å ¥ç¹å¾å¤§å°çäºhidden_sizeã</p></li> +<li><p><strong>bidirection</strong> â 对äºååRNN为çã</p></li> +<li><p><strong>param_specs</strong> â RNNåæ°çåå§åé ç½®ã</p></li> +<li><p><strong>input_sample_shape</strong> â å å«ä¸ä¸ªæ´åæ°ï¼ä»£è¡¨è¾å ¥æ ·æ¬çç¹å¾å¤§å°ã</p></li> </ul> <div class="section" id="id10"> <h4>forward(flag, inputs)<a class="headerlink" href="#id10" title="Permalink to this headline">¶</a></h4> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>flag</strong> â True(kTrain) 代表è®ç»ï¼False(kEval)代表éªè¯; å ¶ä»å¼ç¨ä½ä»¥å使ç¨ã</li> -<li><strong><x1, x2,..xn, hx, cx></strong> â å ¶ä¸ï¼xiæ¯è¾å ¥(inputs,)第i个ä½ç½®çtensorï¼å®çå½¢ç¶æ¯ (batch_size, input_feature_length); xiçbatch_sizeå¿ é¡»å¤§äºxi + 1ç大å°; hxæ¯åå§éèç¶æï¼å½¢ç¶æ¯ï¼num_stacks * bidirectionï¼2ï¼1ï¼batch_sizeï¼hidden_sizeï¼ã cxæ¯ä¸hyç¸åå½¢ç¶çåå§ç»èç¶æå¼ éã cxä» å¯¹lstmææã 对äºå ¶ä»RNNï¼ä¸åå¨cxã hxåcxé½å¯ä»¥æ¯æ²¡æå½¢ç¶åæ°æ®çèæå¼ éã -è¿åå¼ï¼<y1ï¼y2ï¼â¦ ynï¼hyï¼cy>ï¼å ¶ä¸yiæ¯ç¬¬i个ä½ç½®çè¾åºå¼ éï¼å ¶å½¢ç¶æ¯ï¼batch_sizeï¼hidden_size *ååï¼2ï¼1ï¼ã hyæ¯æç»çéèç¶æå¼ éã cxæ¯æç»çç»èç¶æå¼ éã cxä» ç¨äºlstmã</li> +<li><p><strong>flag</strong> â True(kTrain) 代表è®ç»ï¼False(kEval)代表éªè¯; å ¶ä»å¼ç¨ä½ä»¥å使ç¨ã</p></li> +<li><p><strong><x1, x2,..xn, hx, cx></strong> â å ¶ä¸ï¼xiæ¯è¾å ¥(inputs,)第i个ä½ç½®çtensorï¼å®çå½¢ç¶æ¯ (batch_size, input_feature_length); xiçbatch_sizeå¿ é¡»å¤§äºxi + 1ç大å°; hxæ¯åå§éèç¶æï¼å½¢ç¶æ¯ï¼num_stacks * bidirectionï¼2ï¼1ï¼batch_sizeï¼hidden_sizeï¼ã cxæ¯ä¸hyç¸åå½¢ç¶çåå§ç»èç¶æå¼ éã cxä» å¯¹lstmææã 对äºå ¶ä»RNNï¼ä¸åå¨cxã hxåcxé½å¯ä»¥æ¯æ²¡æå½¢ç¶åæ°æ®çèæå¼ éã +è¿åå¼ï¼<y1ï¼y2ï¼â¦ ynï¼hyï¼cy>ï¼å ¶ä¸yiæ¯ç¬¬i个ä½ç½®çè¾åºå¼ éï¼å ¶å½¢ç¶æ¯ï¼batch_sizeï¼hidden_size *ååï¼2ï¼1ï¼ã hyæ¯æç»çéèç¶æå¼ éã cxæ¯æç»çç»èç¶æå¼ éã cxä» ç¨äºlstmã</p></li> </ul> </div> <div class="section" id="id11"> <h4>backward(flag, grad)<a class="headerlink" href="#id11" title="Permalink to this headline">¶</a></h4> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>flag</strong> â æªæ¥ä½¿ç¨</li> -<li><strong><dy1, dy2,..dyn, dhy, dcy></strong> - å ¶ä¸ï¼dyiæ¯(grad,) 第i个ä½ç½®ç梯度ï¼å®çå½¢ç¶æ¯ (batch_size, hidden_size*bidirection?2 (i-th) â 1); dhyæ¯æç»éèç¶æçæ¸åï¼å®çå½¢ç¶æ¯ï¼num_stacks *ååï¼2ï¼1ï¼batch_sizeï¼hidden_sizeï¼ãdcyæ¯æç»åå ç¶æçæ¢¯åº¦ã cxä» å¯¹lstmææï¼å ¶ä»RNNä¸åå¨cxã dhyådcyé½å¯ä»¥æ¯æ²¡æå½¢ç¶åæ°æ®çèætensorã</li> +<li><p><strong>flag</strong> â æªæ¥ä½¿ç¨</p></li> +<li><p><strong><dy1, dy2,..dyn, dhy, dcy></strong> - å ¶ä¸ï¼dyiæ¯(grad,) 第i个ä½ç½®ç梯度ï¼å®çå½¢ç¶æ¯ (batch_size, hidden_size*bidirection?2 (i-th) â 1); dhyæ¯æç»éèç¶æçæ¸åï¼å®çå½¢ç¶æ¯ï¼num_stacks *ååï¼2ï¼1ï¼batch_sizeï¼hidden_sizeï¼ãdcyæ¯æç»åå ç¶æçæ¢¯åº¦ã cxä» å¯¹lstmææï¼å ¶ä»RNNä¸åå¨cxã dhyådcyé½å¯ä»¥æ¯æ²¡æå½¢ç¶åæ°æ®çèætensorã</p></li> </ul> <p><strong>è¿åå¼ï¼</strong> <dx1ï¼dx2ï¼â¦ dxnï¼dhxï¼dcx>ï¼å ¶ä¸dxiæ¯ç¬¬i个è¾å ¥çæ¢¯åº¦å¼ éï¼å®çå½¢ç¶æ¯ï¼batch_sizeï¼input_feature_lengthï¼ã dhxæ¯åå§éèç¶æçæ¢¯åº¦ã dcxæ¯åå§åå ç¶æçæ¢¯åº¦ï¼ä» 对lstmææã</p> </div> @@ -753,50 +753,46 @@ TODO(wangwei) å ç´ çº§å«ç + +<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/apache/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> + - <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="../../index.html">English</a></dd> - <dd><a href=".././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://www.apache.org" style="color:lightblue;padding: 5px; font-size: 10px; text-align: center; text-decoration: none; margin: 5px 2px;">Foundation</a> - <a href="http://www.apache.org/events/current-event" style="color:lightblue;padding: 5px; font-size: 10px; text-align: center; text-decoration: none; margin: 5px 2px;">Events</a> - <a href="http://www.apache.org/foundation/thanks.html" style="color:lightblue;padding: 5px; font-size: 10px; text-align: center; text-decoration: none; margin: 5px 2px;">Thanks</a> - <a href="http://www.apache.org/foundation/sponsorship.html" style="color:lightblue;padding: 5px; font-size: 10px; text-align: center; text-decoration: none; margin: 5px 2px;">Sponsorship</a> - <a href="http://www.apache.org/licenses/" style="color:lightblue;padding: 5px; font-size: 10px; text-align: center; text-decoration: none; margin: 5px 2px;">License</a> - <br> - <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/apache/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 Modified: incubator/singa/site/trunk/zh/docs/loss.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/zh/docs/loss.html?rev=1858059&r1=1858058&r2=1858059&view=diff ============================================================================== --- incubator/singa/site/trunk/zh/docs/loss.html (original) +++ incubator/singa/site/trunk/zh/docs/loss.html Wed Apr 24 14:57:35 2019 @@ -1,5 +1,5 @@ - + <!DOCTYPE html> <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> @@ -9,7 +9,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <title>æå¤±(Loss) — incubator-singa 2.0.0 documentation</title> + <title>æå¤±(Loss) — incubator-singa 1.1.0 documentation</title> @@ -38,18 +38,18 @@ <link rel="search" title="Search" href="../search.html" /> <link rel="next" title="度é(Metric)" href="metric.html" /> <link rel="prev" title="åå§åå¨(Initializer)" href="initializer.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> - + <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> + </head> <body class="wy-body-for-nav"> @@ -243,9 +243,9 @@ <h3>evaluate(flag, x, y)<a class="headerlink" href="#evaluate-flag-x-y" title="Permalink to this headline">¶</a></h3> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>flag (int)</strong> â å¿ é¡»æ¯kEval</li> -<li><strong>x (Tensor)</strong> â 颿µTensor</li> -<li><strong>y (Tensor)</strong> â çå®Tensor</li> +<li><p><strong>flag (int)</strong> â å¿ é¡»æ¯kEval</p></li> +<li><p><strong>x (Tensor)</strong> â 颿µTensor</p></li> +<li><p><strong>y (Tensor)</strong> â çå®Tensor</p></li> </ul> <p><strong>è¿åå¼ï¼</strong> æææ ·æ¬çå¹³åæå¤±</p> </div> @@ -255,9 +255,9 @@ <p>è®¡ç®æå¤±å¼</p> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>flag</strong> â kTrain/kEvalæå¸å°å¼ã妿æ¯kTrain/Trueï¼é£ä¹å¨ä¸ä¸æ¬¡è°ç¨forwardåä¼å è°ç¨backwardè®¡ç®æ¢¯åº¦ã</li> -<li><strong>x (Tensor)</strong> â 颿µTensor</li> -<li><strong>y (Tensor)</strong> â çå®Tensor, x.shape[0]å¿ é¡»åy.shape[0]ç¸å</li> +<li><p><strong>flag</strong> â kTrain/kEvalæå¸å°å¼ã妿æ¯kTrain/Trueï¼é£ä¹å¨ä¸ä¸æ¬¡è°ç¨forwardåä¼å è°ç¨backwardè®¡ç®æ¢¯åº¦ã</p></li> +<li><p><strong>x (Tensor)</strong> â 颿µTensor</p></li> +<li><p><strong>y (Tensor)</strong> â çå®Tensor, x.shape[0]å¿ é¡»åy.shape[0]ç¸å</p></li> </ul> <p><strong>è¿åå¼ï¼</strong> tensorï¼æ¯ä¸ªæ ·æ¬å¯¹åºä¸ä¸ªæµ®ç¹åæå¤±å¼</p> </div> @@ -291,9 +291,9 @@ <p>éè¿0.5 * ||x-y||^2è®¡ç®æå¤±ã</p> <p><strong>åæ°ï¼</strong></p> <ul class="simple"> -<li><strong>flag (int)</strong> â kTrainækEvalï¼å¦ææ¯kTrainï¼é£ä¹å¨ä¸ä¸æ¬¡è°ç¨forwardåä¼å è°ç¨backwardè®¡ç®æ¢¯åº¦ã</li> -<li><strong>x (Tensor)</strong> â 颿µTensor</li> -<li><strong>y (Tensor)</strong> â çå®Tensor, æ¯ä¸ªæ ·æ¬å¯¹åºä¸ä¸ªæ´åæ°, åå¼ä¸º[0, x.shape[1])ã</li> +<li><p><strong>flag (int)</strong> â kTrainækEvalï¼å¦ææ¯kTrainï¼é£ä¹å¨ä¸ä¸æ¬¡è°ç¨forwardåä¼å è°ç¨backwardè®¡ç®æ¢¯åº¦ã</p></li> +<li><p><strong>x (Tensor)</strong> â 颿µTensor</p></li> +<li><p><strong>y (Tensor)</strong> â çå®Tensor, æ¯ä¸ªæ ·æ¬å¯¹åºä¸ä¸ªæ´åæ°, åå¼ä¸º[0, x.shape[1])ã</p></li> </ul> <p><strong>è¿åå¼ï¼</strong> tensorï¼æ¯ä¸ªæ ·æ¬å¯¹åºä¸ä¸ªæå¤±å¼</p> <hr class="docutils" /> @@ -348,50 +348,46 @@ + +<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/apache/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> + - <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="../../index.html">English</a></dd> - <dd><a href=".././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://www.apache.org" style="color:lightblue;padding: 5px; font-size: 10px; text-align: center; text-decoration: none; margin: 5px 2px;">Foundation</a> - <a href="http://www.apache.org/events/current-event" style="color:lightblue;padding: 5px; font-size: 10px; text-align: center; text-decoration: none; margin: 5px 2px;">Events</a> - <a href="http://www.apache.org/foundation/thanks.html" style="color:lightblue;padding: 5px; font-size: 10px; text-align: center; text-decoration: none; margin: 5px 2px;">Thanks</a> - <a href="http://www.apache.org/foundation/sponsorship.html" style="color:lightblue;padding: 5px; font-size: 10px; text-align: center; text-decoration: none; margin: 5px 2px;">Sponsorship</a> - <a href="http://www.apache.org/licenses/" style="color:lightblue;padding: 5px; font-size: 10px; text-align: center; text-decoration: none; margin: 5px 2px;">License</a> - <br> - <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/apache/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
