From f24dec713663fd1fd5b678e90e0e7779dbd1bde0 Mon Sep 17 00:00:00 2001 From: wanghaoshuang Date: Fri, 15 Jun 2018 16:06:51 +0800 Subject: [PATCH] Change 'layers' to 'fluid.layers' --- python/paddle/fluid/layers/control_flow.py | 2 +- python/paddle/fluid/layers/nn.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/python/paddle/fluid/layers/control_flow.py b/python/paddle/fluid/layers/control_flow.py index 8cd389910..b211bc837 100644 --- a/python/paddle/fluid/layers/control_flow.py +++ b/python/paddle/fluid/layers/control_flow.py @@ -1004,7 +1004,7 @@ def array_read(array, i): tmp = fluid.layers.zeros(shape=[10], dtype='int32') i = fluid.layers.fill_constant(shape=[1], dtype='int64', value=10) - arr = layers.array_read(tmp, i=i) + arr = fluid.layers.array_read(tmp, i=i) """ helper = LayerHelper('array_read', **locals()) diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index eba22f596..06fb3504a 100644 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -2916,9 +2916,9 @@ def warpctc(input, label, blank=0, norm_by_times=False): .. code-block:: python - label = layers.data(shape=[11, 8], dtype='float32', lod_level=1) - predict = layers.data(shape=[11, 1], dtype='float32') - cost = layers.warpctc(input=predict, label=label) + label = fluid.layers.data(shape=[11, 8], dtype='float32', lod_level=1) + predict = fluid.layers.data(shape=[11, 1], dtype='float32') + cost = fluid.layers.warpctc(input=predict, label=label) """ helper = LayerHelper('warpctc', **locals()) @@ -2982,7 +2982,7 @@ def sequence_reshape(input, new_dim): .. code-block:: python x = fluid.layers.data(shape=[5, 20], dtype='float32', lod_level=1) - x_reshaped = layers.sequence_reshape(input=x, new_dim=10) + x_reshaped = fluid.layers.sequence_reshape(input=x, new_dim=10) """ helper = LayerHelper('sequence_reshape', **locals()) out = helper.create_tmp_variable(helper.input_dtype()) -- GitLab