From 3a08e01116d09bec2966fbf7049c7a7d71cd2d3b Mon Sep 17 00:00:00 2001 From: guru4elephant <35550832+guru4elephant@users.noreply.github.com> Date: Thu, 15 Nov 2018 12:48:56 +0800 Subject: [PATCH] Update async_executor.md --- doc/fluid/design/async_executor/async_executor.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/fluid/design/async_executor/async_executor.md b/doc/fluid/design/async_executor/async_executor.md index 0af993b90..725ebc4e7 100644 --- a/doc/fluid/design/async_executor/async_executor.md +++ b/doc/fluid/design/async_executor/async_executor.md @@ -6,8 +6,8 @@ There are many deep learning applications that use sparse features as inputs, su ``` python def train_loop(): filelist = ["file%d.txt" % i for i in range(10)] - dataset = MultiSlotDataset() - dataset.set_batch_size(128) + dataset = MultiSlotDataset() # a datafeeddesc of Dataset + dataset.set_batch_size(128) # datafeed should be assigned a batch size # input text data data = fluid.layers.data(name="words", shape=[1], dtype="int64", lod_level=1) # label data @@ -36,7 +36,7 @@ def train_loop(): reader=dataset, # make sure this can be changed during iteration filelist=filelist, # this can be changed during iteration thread=thread_num, # make sure this can be changed during iteration - fetch=[acc]) # how to define fetch, and what kind of things to return here + fetch=[acc]) # fetch can be done with python, but the scope should be exposed print("accuracy %f" % acc_val) executor.save_model(infer_prog, "epoch%d.model" % i) -- GitLab