From 354aa119086c27d54d49bcad5536022008ac8dfa Mon Sep 17 00:00:00 2001 From: guru4elephant <35550832+guru4elephant@users.noreply.github.com> Date: Wed, 21 Nov 2018 16:12:57 +0800 Subject: [PATCH] Update async_executor.md --- doc/fluid/design/async_executor/async_executor.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/fluid/design/async_executor/async_executor.md b/doc/fluid/design/async_executor/async_executor.md index d9baa9efa..ae57daec8 100644 --- a/doc/fluid/design/async_executor/async_executor.md +++ b/doc/fluid/design/async_executor/async_executor.md @@ -6,10 +6,10 @@ There are many deep learning applications that use sparse features as inputs, su ``` python def train_loop(): filelist = ["testfile.data"] # filelist file to be handled - dataset = fluid.DataFeedDesc('data.prototxt') # this prototxt is a datafile description protobuf - dataset.set_batch_size(1) # datafeed should be assigned a batch size data = fluid.layers.data(name="doc", shape=[1], dtype="int64", lod_level=1) # input text data label = fluid.layers.data(name="title", shape=[1], dtype="int64", lod_level=1) # label data + dataset = fluid.MultiSlotData('data.prototxt', data, label) + dataset.set_batch_size(128) 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) -- GitLab