提交 63e3e8bc 编写于 作者: T Travis CI

Deploy to GitHub Pages: 9d91ae5f

上级 fd37dcd5
...@@ -101,9 +101,11 @@ t.transpile(optimize_ops, params_grads, pservers=pserver_endpoints, trainers=2) ...@@ -101,9 +101,11 @@ t.transpile(optimize_ops, params_grads, pservers=pserver_endpoints, trainers=2)
... #create executor ... #create executor
# in pserver, run this # in pserver, run this
exe.run(fluid.default_startup_program())
#current_endpoint here means current pserver IP:PORT you wish to run on #current_endpoint here means current pserver IP:PORT you wish to run on
exe.run(t.get_pserver_program(current_endpoint)) pserver_prog = t.get_pserver_program(current_endpoint)
pserver_startup = t.get_startup_program(current_endpoint, pserver_prog)
exe.run(pserver_startup)
exe.run(pserver_prog)
# in trainer, run this # in trainer, run this
... # define data reader ... # define data reader
......
...@@ -299,9 +299,11 @@ ...@@ -299,9 +299,11 @@
<span class="o">...</span> <span class="c1">#create executor</span> <span class="o">...</span> <span class="c1">#create executor</span>
<span class="c1"># in pserver, run this</span> <span class="c1"># in pserver, run this</span>
<span class="n">exe</span><span class="o">.</span><span class="n">run</span><span class="p">(</span><span class="n">fluid</span><span class="o">.</span><span class="n">default_startup_program</span><span class="p">())</span>
<span class="c1">#current_endpoint here means current pserver IP:PORT you wish to run on</span> <span class="c1">#current_endpoint here means current pserver IP:PORT you wish to run on</span>
<span class="n">exe</span><span class="o">.</span><span class="n">run</span><span class="p">(</span><span class="n">t</span><span class="o">.</span><span class="n">get_pserver_program</span><span class="p">(</span><span class="n">current_endpoint</span><span class="p">))</span> <span class="n">pserver_prog</span> <span class="o">=</span> <span class="n">t</span><span class="o">.</span><span class="n">get_pserver_program</span><span class="p">(</span><span class="n">current_endpoint</span><span class="p">)</span>
<span class="n">pserver_startup</span> <span class="o">=</span> <span class="n">t</span><span class="o">.</span><span class="n">get_startup_program</span><span class="p">(</span><span class="n">current_endpoint</span><span class="p">,</span> <span class="n">pserver_prog</span><span class="p">)</span>
<span class="n">exe</span><span class="o">.</span><span class="n">run</span><span class="p">(</span><span class="n">pserver_startup</span><span class="p">)</span>
<span class="n">exe</span><span class="o">.</span><span class="n">run</span><span class="p">(</span><span class="n">pserver_prog</span><span class="p">)</span>
<span class="c1"># in trainer, run this</span> <span class="c1"># in trainer, run this</span>
<span class="o">...</span> <span class="c1"># define data reader</span> <span class="o">...</span> <span class="c1"># define data reader</span>
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册