未验证 提交 eff68af9 编写于 作者: G guru4elephant 提交者: GitHub

Update async_executor.md

上级 feb074c1
......@@ -13,10 +13,7 @@ def train_loop():
avg_cost, acc, prediction = bow_net(data, label)
sgd_optimizer = fluid.optimizer.Adagrad(learning_rate=0.002)
opt_ops, weight_and_grad = sgd_optimizer.minimize(avg_cost)
place = fluid.CPUPlace()
executor = fluid.Executor(place)
executor.run(startup_program)
async_executor = fluid.AsyncExecutor(place)
async_executor = fluid.AsyncExecutor()
async_executor.run_startup_program(fluid.default_startup_program())
epochs = 10
for i in range(epochs):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册