提交 9248c85c 编写于 作者: T Travis CI

Deploy to GitHub Pages: e0ae76f2

上级 f6401fc7
......@@ -202,8 +202,8 @@ This `OpDesc` value is in the `ops` field of the `BlockDesc` value representing
During the generation of the Protobuf message, the Block should store VarDesc (the Protobuf message which describes Variable) and OpDesc (the Protobuf message which describes Operator).
VarDesc in a block should have its name scope to avoid local variables affect parent block's name scope.
Child block's name scopes should inherit the parent's so that OpDesc in child block can reference a VarDesc that stored in parent block. For example:
VarDesc in a block should have its name scope to avoid local variables affecting parent block's name scope.
Child block's name scopes should inherit the parent's so that OpDesc in child block can reference a VarDesc that is stored in the parent block. For example:
```python
a = pd.Variable(shape=[20, 20])
......
## Background
PaddlePaddle divides the description of neural network computation graph into two stages: compile time and runtime.
PaddlePaddle divides the description of neural network computation into two stages: compile time and runtime. At compile time, the neural network computation is described as a `ProgramDesc` whereas at runtime an `Executor` interprets the `ProgramDesc` to compute the operations.
PaddlePaddle use proto message to describe compile time graph because
PaddlePaddle use proto message to describe compile time program because
1. Computation graph should be able to be saved to a file.
1. In distributed training, the graph will be serialized and send to multiple workers.
1. The computation program description must be serializable and saved in a file.
1. During distributed training, the sreialized program will be sent to multiple workers. It should also be possible to break the program into different components, each of which can be executed on different workers.
The computation graph is constructed by Data Node and Operation Node. The concept to represent them is in the table below.
The computation `Program` consists of nested `Blocks`. Each `Block` will consist of data(i.e. `Variable`) and `Operations`. The concept to represent them is in the table below.
| |compile time|runtime|
|---|---|---|
......
......@@ -393,8 +393,8 @@
<div class="section" id="the-compilation-of-blocks">
<span id="the-compilation-of-blocks"></span><h2>The Compilation of Blocks<a class="headerlink" href="#the-compilation-of-blocks" title="Permalink to this headline"></a></h2>
<p>During the generation of the Protobuf message, the Block should store VarDesc (the Protobuf message which describes Variable) and OpDesc (the Protobuf message which describes Operator).</p>
<p>VarDesc in a block should have its name scope to avoid local variables affect parent block&#8217;s name scope.
Child block&#8217;s name scopes should inherit the parent&#8217;s so that OpDesc in child block can reference a VarDesc that stored in parent block. For example:</p>
<p>VarDesc in a block should have its name scope to avoid local variables affecting parent block&#8217;s name scope.
Child block&#8217;s name scopes should inherit the parent&#8217;s so that OpDesc in child block can reference a VarDesc that is stored in the parent block. For example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">a</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="n">shape</span><span class="o">=</span><span class="p">[</span><span class="mi">20</span><span class="p">,</span> <span class="mi">20</span><span class="p">])</span>
<span class="n">b</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">fc</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">params</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;fc.w&quot;</span><span class="p">,</span> <span class="s2">&quot;fc.b&quot;</span><span class="p">])</span>
......
......@@ -210,13 +210,13 @@
<div class="section" id="background">
<span id="background"></span><h1>Background<a class="headerlink" href="#background" title="Permalink to this headline"></a></h1>
<p>PaddlePaddle divides the description of neural network computation graph into two stages: compile time and runtime.</p>
<p>PaddlePaddle use proto message to describe compile time graph because</p>
<p>PaddlePaddle divides the description of neural network computation into two stages: compile time and runtime. At compile time, the neural network computation is described as a <code class="docutils literal"><span class="pre">ProgramDesc</span></code> whereas at runtime an <code class="docutils literal"><span class="pre">Executor</span></code> interprets the <code class="docutils literal"><span class="pre">ProgramDesc</span></code> to compute the operations.</p>
<p>PaddlePaddle use proto message to describe compile time program because</p>
<ol class="simple">
<li>Computation graph should be able to be saved to a file.</li>
<li>In distributed training, the graph will be serialized and send to multiple workers.</li>
<li>The computation program description must be serializable and saved in a file.</li>
<li>During distributed training, the sreialized program will be sent to multiple workers. It should also be possible to break the program into different components, each of which can be executed on different workers.</li>
</ol>
<p>The computation graph is constructed by Data Node and Operation Node. The concept to represent them is in the table below.</p>
<p>The computation <code class="docutils literal"><span class="pre">Program</span></code> consists of nested <code class="docutils literal"><span class="pre">Blocks</span></code>. Each <code class="docutils literal"><span class="pre">Block</span></code> will consist of data(i.e. <code class="docutils literal"><span class="pre">Variable</span></code>) and <code class="docutils literal"><span class="pre">Operations</span></code>. The concept to represent them is in the table below.</p>
<p>| |compile time|runtime|
|&#8212;|&#8212;|&#8212;|
|Data|VarDesc(proto)|Variable(cpp)|
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -202,8 +202,8 @@ This `OpDesc` value is in the `ops` field of the `BlockDesc` value representing
During the generation of the Protobuf message, the Block should store VarDesc (the Protobuf message which describes Variable) and OpDesc (the Protobuf message which describes Operator).
VarDesc in a block should have its name scope to avoid local variables affect parent block's name scope.
Child block's name scopes should inherit the parent's so that OpDesc in child block can reference a VarDesc that stored in parent block. For example:
VarDesc in a block should have its name scope to avoid local variables affecting parent block's name scope.
Child block's name scopes should inherit the parent's so that OpDesc in child block can reference a VarDesc that is stored in the parent block. For example:
```python
a = pd.Variable(shape=[20, 20])
......
## Background
PaddlePaddle divides the description of neural network computation graph into two stages: compile time and runtime.
PaddlePaddle divides the description of neural network computation into two stages: compile time and runtime. At compile time, the neural network computation is described as a `ProgramDesc` whereas at runtime an `Executor` interprets the `ProgramDesc` to compute the operations.
PaddlePaddle use proto message to describe compile time graph because
PaddlePaddle use proto message to describe compile time program because
1. Computation graph should be able to be saved to a file.
1. In distributed training, the graph will be serialized and send to multiple workers.
1. The computation program description must be serializable and saved in a file.
1. During distributed training, the sreialized program will be sent to multiple workers. It should also be possible to break the program into different components, each of which can be executed on different workers.
The computation graph is constructed by Data Node and Operation Node. The concept to represent them is in the table below.
The computation `Program` consists of nested `Blocks`. Each `Block` will consist of data(i.e. `Variable`) and `Operations`. The concept to represent them is in the table below.
| |compile time|runtime|
|---|---|---|
......
......@@ -406,8 +406,8 @@
<div class="section" id="the-compilation-of-blocks">
<span id="the-compilation-of-blocks"></span><h2>The Compilation of Blocks<a class="headerlink" href="#the-compilation-of-blocks" title="永久链接至标题"></a></h2>
<p>During the generation of the Protobuf message, the Block should store VarDesc (the Protobuf message which describes Variable) and OpDesc (the Protobuf message which describes Operator).</p>
<p>VarDesc in a block should have its name scope to avoid local variables affect parent block&#8217;s name scope.
Child block&#8217;s name scopes should inherit the parent&#8217;s so that OpDesc in child block can reference a VarDesc that stored in parent block. For example:</p>
<p>VarDesc in a block should have its name scope to avoid local variables affecting parent block&#8217;s name scope.
Child block&#8217;s name scopes should inherit the parent&#8217;s so that OpDesc in child block can reference a VarDesc that is stored in the parent block. For example:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">a</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Variable</span><span class="p">(</span><span class="n">shape</span><span class="o">=</span><span class="p">[</span><span class="mi">20</span><span class="p">,</span> <span class="mi">20</span><span class="p">])</span>
<span class="n">b</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">fc</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">params</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;fc.w&quot;</span><span class="p">,</span> <span class="s2">&quot;fc.b&quot;</span><span class="p">])</span>
......
......@@ -223,13 +223,13 @@
<div class="section" id="background">
<span id="background"></span><h1>Background<a class="headerlink" href="#background" title="永久链接至标题"></a></h1>
<p>PaddlePaddle divides the description of neural network computation graph into two stages: compile time and runtime.</p>
<p>PaddlePaddle use proto message to describe compile time graph because</p>
<p>PaddlePaddle divides the description of neural network computation into two stages: compile time and runtime. At compile time, the neural network computation is described as a <code class="docutils literal"><span class="pre">ProgramDesc</span></code> whereas at runtime an <code class="docutils literal"><span class="pre">Executor</span></code> interprets the <code class="docutils literal"><span class="pre">ProgramDesc</span></code> to compute the operations.</p>
<p>PaddlePaddle use proto message to describe compile time program because</p>
<ol class="simple">
<li>Computation graph should be able to be saved to a file.</li>
<li>In distributed training, the graph will be serialized and send to multiple workers.</li>
<li>The computation program description must be serializable and saved in a file.</li>
<li>During distributed training, the sreialized program will be sent to multiple workers. It should also be possible to break the program into different components, each of which can be executed on different workers.</li>
</ol>
<p>The computation graph is constructed by Data Node and Operation Node. The concept to represent them is in the table below.</p>
<p>The computation <code class="docutils literal"><span class="pre">Program</span></code> consists of nested <code class="docutils literal"><span class="pre">Blocks</span></code>. Each <code class="docutils literal"><span class="pre">Block</span></code> will consist of data(i.e. <code class="docutils literal"><span class="pre">Variable</span></code>) and <code class="docutils literal"><span class="pre">Operations</span></code>. The concept to represent them is in the table below.</p>
<p>| |compile time|runtime|
|&#8212;|&#8212;|&#8212;|
|Data|VarDesc(proto)|Variable(cpp)|
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册