From 9185579c45281641618e95996b3451a5a81ea215 Mon Sep 17 00:00:00 2001 From: Xin Pan Date: Tue, 12 Jun 2018 21:58:28 +0800 Subject: [PATCH] follow comments --- python/paddle/fluid/layers/control_flow.py | 1 + python/paddle/fluid/layers/io.py | 1 + 2 files changed, 2 insertions(+) diff --git a/python/paddle/fluid/layers/control_flow.py b/python/paddle/fluid/layers/control_flow.py index 7e541efcf..227919771 100644 --- a/python/paddle/fluid/layers/control_flow.py +++ b/python/paddle/fluid/layers/control_flow.py @@ -1218,6 +1218,7 @@ class IfElse(object): Examples: .. code-block:: python + limit = layers.fill_constant_batch_size_like( input=label, dtype='int64', shape=[1], value=5.0) cond = layers.less_than(x=label, y=limit) diff --git a/python/paddle/fluid/layers/io.py b/python/paddle/fluid/layers/io.py index df264e4f2..f3aeb6cd7 100644 --- a/python/paddle/fluid/layers/io.py +++ b/python/paddle/fluid/layers/io.py @@ -596,6 +596,7 @@ class Preprocessor(object): Examples: .. code-block:: python + preprocessor = fluid.layers.io.Preprocessor(reader=reader) with preprocessor.block(): img, lbl = preprocessor.inputs() -- GitLab