未验证 提交 06e23377 编写于 作者: C Chen Weihang 提交者: GitHub

fix example code error (#2226)

上级 a0ea5684
...@@ -25,12 +25,12 @@ double_buffer ...@@ -25,12 +25,12 @@ double_buffer
.. code-block:: python .. code-block:: python
import paddle.fluid as fluid import paddle.fluid as fluid
reader = fluid.layers.open_files(filenames=['mnist.recordio'], reader = fluid.layers.py_reader(capacity=64,
shapes=[[-1, 784], [-1, 1]], shapes=[(-1, 1, 28, 28), (-1, 1)],
lod_levels=[0, 0], dtypes=['float32', 'int64'],
dtypes=['float32', 'int64']) use_double_buffer=False)
reader = fluid.layers.double_buffer(reader) reader = fluid.layers.double_buffer(reader)
img, label = fluid.layers.read_file(reader) image, label = fluid.layers.read_file(reader)
......
...@@ -113,7 +113,6 @@ py_reader ...@@ -113,7 +113,6 @@ py_reader
dtypes=['float32', 'int64'], dtypes=['float32', 'int64'],
name='test_reader') name='test_reader')
test_reader.decorate_paddle_reader(paddle.batch(mnist.test(), 512)) test_reader.decorate_paddle_reader(paddle.batch(mnist.test(), 512))
test_loss = network(test_reader) test_loss = network(test_reader)
fluid.Executor(fluid.CUDAPlace(0)).run(train_startup_prog) fluid.Executor(fluid.CUDAPlace(0)).run(train_startup_prog)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册