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

Update async_executor.md

上级 354aa119
...@@ -8,7 +8,7 @@ def train_loop(): ...@@ -8,7 +8,7 @@ def train_loop():
filelist = ["testfile.data"] # filelist file to be handled filelist = ["testfile.data"] # filelist file to be handled
data = fluid.layers.data(name="doc", shape=[1], dtype="int64", lod_level=1) # input text data 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 label = fluid.layers.data(name="title", shape=[1], dtype="int64", lod_level=1) # label data
dataset = fluid.MultiSlotData('data.prototxt', data, label) dataset = fluid.DatasetDesc(desc='data.prototxt', slots=[data, label])
dataset.set_batch_size(128) dataset.set_batch_size(128)
avg_cost, acc, prediction = bow_net(data, label) avg_cost, acc, prediction = bow_net(data, label)
sgd_optimizer = fluid.optimizer.Adagrad(learning_rate=0.002) sgd_optimizer = fluid.optimizer.Adagrad(learning_rate=0.002)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册