From b4b69582b2eaeb68c09fc851258bc841d65abed2 Mon Sep 17 00:00:00 2001 From: liangbh <346883935@qq.com> Date: Wed, 11 Dec 2019 11:24:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9fluid.io.shuffle=E7=9A=84?= =?UTF-8?q?=E6=A1=88=E4=BE=8B=EF=BC=8C=E5=8E=9F=E6=A1=88=E4=BE=8B=E4=B8=8D?= =?UTF-8?q?=E5=87=86=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/fluid/api_cn/io_cn/shuffle_cn.rst | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/doc/fluid/api_cn/io_cn/shuffle_cn.rst b/doc/fluid/api_cn/io_cn/shuffle_cn.rst index a986fc7b3..c5ac34090 100644 --- a/doc/fluid/api_cn/io_cn/shuffle_cn.rst +++ b/doc/fluid/api_cn/io_cn/shuffle_cn.rst @@ -21,9 +21,19 @@ shuffle import paddle.fluid as fluid def reader(): - for i in range(5): + for i in range(10): yield i - shuffled_reader = fluid.io.shuffle(reader, 3) + shuffled_reader = fluid.io.shuffle(reader, 5) for e in shuffled_reader(): print(e) - # 输出结果是0~4的无序排列 + # 输出结果是0~4的无序排列,加上5~9的无序排列 + #1 + #4 + #0 + #2 + #3 + #8 + #6 + #5 + #7 + #9 -- GitLab