From e08a75d78b653e720fa87c012ca1d1e0d60653ac Mon Sep 17 00:00:00 2001 From: huzhiqiang <912790387@qq.com> Date: Fri, 27 Sep 2019 15:28:34 +0800 Subject: [PATCH] modify API doc : remove reader.map_readers and modify fluid.io.map_readers (#1412) * remove map_readers from reader API --- doc/fluid/api_cn/data/data_reader_cn/Reader_cn.rst | 14 -------------- doc/fluid/api_cn/io_cn/map_readers_cn.rst | 6 ++++-- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/doc/fluid/api_cn/data/data_reader_cn/Reader_cn.rst b/doc/fluid/api_cn/data/data_reader_cn/Reader_cn.rst index e66b502d2..37fbc4704 100644 --- a/doc/fluid/api_cn/data/data_reader_cn/Reader_cn.rst +++ b/doc/fluid/api_cn/data/data_reader_cn/Reader_cn.rst @@ -44,20 +44,6 @@ Data Reader Interface yield numpy.random.uniform(-1, 1, size=width*height), label return reader -.. py:function:: paddle.reader.map_readers(func, *readers) - -创建使用每个数据读取器的输出作为参数输出函数返回值的数据读取器。 - -参数: - - **func** - 使用的函数. 函数类型应为(Sample) => Sample - - **readers** - 其输出将用作func参数的reader。 - -类型:callable - -返回: 被创建数据的读取器 - -返回类型: callable - .. py:function:: paddle.reader.buffered(reader, size) diff --git a/doc/fluid/api_cn/io_cn/map_readers_cn.rst b/doc/fluid/api_cn/io_cn/map_readers_cn.rst index 054f2c027..55e9b7bae 100644 --- a/doc/fluid/api_cn/io_cn/map_readers_cn.rst +++ b/doc/fluid/api_cn/io_cn/map_readers_cn.rst @@ -20,7 +20,8 @@ map_readers .. code-block:: python - import paddle.reader + + import paddle.fluid as fluid d = {"h": 0, "i": 1} def func(x): return d[x] @@ -29,7 +30,8 @@ map_readers yield "h" yield "i" - map_reader_result = paddle.reader.map_readers(func, reader) + map_reader_result = fluid.io.map_readers(func, reader) + -- GitLab