提交 aa74ca3f 编写于 作者: T Travis CI

Deploy to GitHub Pages: 81374eb1

上级 c7694dbd
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
$ export DEVICES=$(\ls /dev/nvidia* | xargs -I{} echo '--device {}:{}') $ export DEVICES=$(\ls /dev/nvidia* | xargs -I{} echo '--device {}:{}')
$ docker run ${CUDA_SO} ${DEVICES} -it paddlepaddle/paddle:latest-gpu $ docker run ${CUDA_SO} ${DEVICES} -it paddlepaddle/paddle:latest-gpu
更多关于Docker的安装与使用, 请参考 `PaddlePaddle Docker 文档 <http://www.paddlepaddle.org/doc_cn/build_and_install/install/docker_install.html>`_ 。 更多关于Docker的安装与使用, 请参考 `PaddlePaddle Docker 文档 <http://www.paddlepaddle.org/docs/0.11.0/documentation/zh/getstarted/build_and_install/docker_install_cn.html>`_ 。
2. CMake源码编译, 找到的PythonLibs和PythonInterp版本不一致 2. CMake源码编译, 找到的PythonLibs和PythonInterp版本不一致
......
FAQ FAQ
==== ====
本文档对关于PaddlePaddle的一些常见问题提供了解答。如果您的问题未在此处,请您到 `PaddlePaddle社区 <https://github.com/PaddlePaddle/Paddle/issues>`_ 查找答案或直接提 `issue <https://github.com/PaddlePaddle/Paddle/issues/new>`_ ,我们会及时进行回复。
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
......
...@@ -148,7 +148,7 @@ Paddle二进制在运行时捕获了浮点数异常,只要出现浮点数异 ...@@ -148,7 +148,7 @@ Paddle二进制在运行时捕获了浮点数异常,只要出现浮点数异
.. code-block:: python .. code-block:: python
optimizer = paddle.optimizer.RMSProp( optimizer = paddle.optimizer.RMSProp(
learning_rate=1e-3, learning_rate=1e-3,
gradient_clipping_threshold=10.0, gradient_clipping_threshold=10.0,
regularization=paddle.optimizer.L2Regularization(rate=8e-4)) regularization=paddle.optimizer.L2Regularization(rate=8e-4))
...@@ -159,7 +159,7 @@ optimizer = paddle.optimizer.RMSProp( ...@@ -159,7 +159,7 @@ optimizer = paddle.optimizer.RMSProp(
.. code-block:: python .. code-block:: python
decoder_inputs = paddle.layer.fc( decoder_inputs = paddle.layer.fc(
act=paddle.activation.Linear(), act=paddle.activation.Linear(),
size=decoder_size * 3, size=decoder_size * 3,
bias_attr=False, bias_attr=False,
......
...@@ -196,6 +196,6 @@ PaddlePaddle保存的模型参数文件内容由16字节头信息和网络参数 ...@@ -196,6 +196,6 @@ PaddlePaddle保存的模型参数文件内容由16字节头信息和网络参数
obj="process", obj="process",
args={"src_dict_path": src_dict_path}) args={"src_dict_path": src_dict_path})
完整源码可参考 `seqToseq <https://github.com/PaddlePaddle/Paddle/tree/develop/demo/seqToseq>`_ 示例。 完整源码可参考 `sequence_recurrent <https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/gserver/tests/sequence_recurrent.py>`_ 示例。
...@@ -228,7 +228,7 @@ $ <span class="nb">export</span> <span class="nv">DEVICES</span><span class="o"> ...@@ -228,7 +228,7 @@ $ <span class="nb">export</span> <span class="nv">DEVICES</span><span class="o">
$ docker run <span class="si">${</span><span class="nv">CUDA_SO</span><span class="si">}</span> <span class="si">${</span><span class="nv">DEVICES</span><span class="si">}</span> -it paddlepaddle/paddle:latest-gpu $ docker run <span class="si">${</span><span class="nv">CUDA_SO</span><span class="si">}</span> <span class="si">${</span><span class="nv">DEVICES</span><span class="si">}</span> -it paddlepaddle/paddle:latest-gpu
</pre></div> </pre></div>
</div> </div>
<p>更多关于Docker的安装与使用, 请参考 <a class="reference external" href="http://www.paddlepaddle.org/doc_cn/build_and_install/install/docker_install.html">PaddlePaddle Docker 文档</a></p> <p>更多关于Docker的安装与使用, 请参考 <a class="reference external" href="http://www.paddlepaddle.org/docs/0.11.0/documentation/zh/getstarted/build_and_install/docker_install_cn.html">PaddlePaddle Docker 文档</a></p>
</div> </div>
<div class="section" id="cmake-pythonlibspythoninterp"> <div class="section" id="cmake-pythonlibspythoninterp">
<h2><a class="toc-backref" href="#id4">2. CMake源码编译, 找到的PythonLibs和PythonInterp版本不一致</a><a class="headerlink" href="#cmake-pythonlibspythoninterp" title="永久链接至标题"></a></h2> <h2><a class="toc-backref" href="#id4">2. CMake源码编译, 找到的PythonLibs和PythonInterp版本不一致</a><a class="headerlink" href="#cmake-pythonlibspythoninterp" title="永久链接至标题"></a></h2>
......
...@@ -200,6 +200,7 @@ ...@@ -200,6 +200,7 @@
<div class="section" id="faq"> <div class="section" id="faq">
<h1>FAQ<a class="headerlink" href="#faq" title="永久链接至标题"></a></h1> <h1>FAQ<a class="headerlink" href="#faq" title="永久链接至标题"></a></h1>
<p>本文档对关于PaddlePaddle的一些常见问题提供了解答。如果您的问题未在此处,请您到 <a class="reference external" href="https://github.com/PaddlePaddle/Paddle/issues">PaddlePaddle社区</a> 查找答案或直接提 <a class="reference external" href="https://github.com/PaddlePaddle/Paddle/issues/new">issue</a> ,我们会及时进行回复。</p>
<div class="toctree-wrapper compound"> <div class="toctree-wrapper compound">
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="build_and_install/index_cn.html">编译安装与单元测试</a></li> <li class="toctree-l1"><a class="reference internal" href="build_and_install/index_cn.html">编译安装与单元测试</a></li>
......
...@@ -442,33 +442,25 @@ PaddlePaddle的内存占用主要分为如下几个方面:</p> ...@@ -442,33 +442,25 @@ PaddlePaddle的内存占用主要分为如下几个方面:</p>
<ol class="arabic simple"> <ol class="arabic simple">
<li>设置 <code class="code docutils literal"><span class="pre">gradient_clipping_threshold</span></code> 参数,示例代码如下:</li> <li>设置 <code class="code docutils literal"><span class="pre">gradient_clipping_threshold</span></code> 参数,示例代码如下:</li>
</ol> </ol>
<div class="highlight-python"><div class="highlight"><pre><span></span> <div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">optimizer</span> <span class="o">=</span> <span class="n">paddle</span><span class="o">.</span><span class="n">optimizer</span><span class="o">.</span><span class="n">RMSProp</span><span class="p">(</span>
<span class="n">learning_rate</span><span class="o">=</span><span class="mf">1e-3</span><span class="p">,</span>
<span class="n">gradient_clipping_threshold</span><span class="o">=</span><span class="mf">10.0</span><span class="p">,</span>
<span class="n">regularization</span><span class="o">=</span><span class="n">paddle</span><span class="o">.</span><span class="n">optimizer</span><span class="o">.</span><span class="n">L2Regularization</span><span class="p">(</span><span class="n">rate</span><span class="o">=</span><span class="mf">8e-4</span><span class="p">))</span>
</pre></div> </pre></div>
</div> </div>
<dl class="docutils">
<dt>optimizer = paddle.optimizer.RMSProp(</dt>
<dd>learning_rate=1e-3,
gradient_clipping_threshold=10.0,
regularization=paddle.optimizer.L2Regularization(rate=8e-4))</dd>
</dl>
<p>具体可以参考 <a class="reference external" href="https://github.com/PaddlePaddle/models/blob/develop/nmt_without_attention/train.py#L35">nmt_without_attention</a> 示例。</p> <p>具体可以参考 <a class="reference external" href="https://github.com/PaddlePaddle/models/blob/develop/nmt_without_attention/train.py#L35">nmt_without_attention</a> 示例。</p>
<ol class="arabic simple" start="2"> <ol class="arabic simple" start="2">
<li>设置 <code class="code docutils literal"><span class="pre">error_clipping_threshold</span></code> 参数,示例代码如下:</li> <li>设置 <code class="code docutils literal"><span class="pre">error_clipping_threshold</span></code> 参数,示例代码如下:</li>
</ol> </ol>
<div class="highlight-python"><div class="highlight"><pre><span></span> <div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">decoder_inputs</span> <span class="o">=</span> <span class="n">paddle</span><span class="o">.</span><span class="n">layer</span><span class="o">.</span><span class="n">fc</span><span class="p">(</span>
<span class="n">act</span><span class="o">=</span><span class="n">paddle</span><span class="o">.</span><span class="n">activation</span><span class="o">.</span><span class="n">Linear</span><span class="p">(),</span>
<span class="n">size</span><span class="o">=</span><span class="n">decoder_size</span> <span class="o">*</span> <span class="mi">3</span><span class="p">,</span>
<span class="n">bias_attr</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span>
<span class="nb">input</span><span class="o">=</span><span class="p">[</span><span class="n">context</span><span class="p">,</span> <span class="n">current_word</span><span class="p">],</span>
<span class="n">layer_attr</span><span class="o">=</span><span class="n">paddle</span><span class="o">.</span><span class="n">attr</span><span class="o">.</span><span class="n">ExtraLayerAttribute</span><span class="p">(</span>
<span class="n">error_clipping_threshold</span><span class="o">=</span><span class="mf">100.0</span><span class="p">))</span>
</pre></div> </pre></div>
</div> </div>
<dl class="docutils">
<dt>decoder_inputs = paddle.layer.fc(</dt>
<dd><p class="first">act=paddle.activation.Linear(),
size=decoder_size * 3,
bias_attr=False,
input=[context, current_word],
layer_attr=paddle.attr.ExtraLayerAttribute(</p>
<blockquote class="last">
<div>error_clipping_threshold=100.0))</div></blockquote>
</dd>
</dl>
<p>完整代码可以参考示例 <a class="reference external" href="https://github.com/PaddlePaddle/book/blob/develop/08.machine_translation/train.py#L66">machine translation</a></p> <p>完整代码可以参考示例 <a class="reference external" href="https://github.com/PaddlePaddle/book/blob/develop/08.machine_translation/train.py#L66">machine translation</a></p>
<p>两种方法的区别:</p> <p>两种方法的区别:</p>
<ol class="arabic simple"> <ol class="arabic simple">
......
...@@ -371,7 +371,7 @@ F1205 <span class="m">14</span>:59:50.295174 <span class="m">14703</span> Traine ...@@ -371,7 +371,7 @@ F1205 <span class="m">14</span>:59:50.295174 <span class="m">14703</span> Traine
<span class="n">args</span><span class="o">=</span><span class="p">{</span><span class="s2">&quot;src_dict_path&quot;</span><span class="p">:</span> <span class="n">src_dict_path</span><span class="p">})</span> <span class="n">args</span><span class="o">=</span><span class="p">{</span><span class="s2">&quot;src_dict_path&quot;</span><span class="p">:</span> <span class="n">src_dict_path</span><span class="p">})</span>
</pre></div> </pre></div>
</div> </div>
<p>完整源码可参考 <a class="reference external" href="https://github.com/PaddlePaddle/Paddle/tree/develop/demo/seqToseq">seqToseq</a> 示例。</p> <p>完整源码可参考 <a class="reference external" href="https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/gserver/tests/sequence_recurrent.py">sequence_recurrent</a> 示例。</p>
</div> </div>
</div> </div>
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册