From eff68af9c50a7416a87f03c86b2a4c2accfba1bb Mon Sep 17 00:00:00 2001 From: guru4elephant <35550832+guru4elephant@users.noreply.github.com> Date: Wed, 21 Nov 2018 15:58:29 +0800 Subject: [PATCH] Update async_executor.md --- doc/fluid/design/async_executor/async_executor.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/doc/fluid/design/async_executor/async_executor.md b/doc/fluid/design/async_executor/async_executor.md index ef2e00355..17f7ab8e8 100644 --- a/doc/fluid/design/async_executor/async_executor.md +++ b/doc/fluid/design/async_executor/async_executor.md @@ -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): -- GitLab