From 0019eb376ac83fda927025c1c5c3d8cd54fe4b66 Mon Sep 17 00:00:00 2001 From: wawltor <980627148@qq.com> Date: Tue, 13 Aug 2019 11:17:16 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20the=20error=20of=20op=20`ones=5Flike`=20d?= =?UTF-8?q?ocument=EF=BC=8Cchange=20the=20output=20variable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test=document_preview test=develop Fix the error of op `ones_like` document, change the output variable from x to out. --- paddle/fluid/API.spec | 2 +- python/paddle/fluid/layers/tensor.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/API.spec b/paddle/fluid/API.spec index bbb541a7579..51e746970e6 100644 --- a/paddle/fluid/API.spec +++ b/paddle/fluid/API.spec @@ -308,7 +308,7 @@ paddle.fluid.layers.isfinite (ArgSpec(args=['x'], varargs=None, keywords=None, d paddle.fluid.layers.range (ArgSpec(args=['start', 'end', 'step', 'dtype'], varargs=None, keywords=None, defaults=None), ('document', 'a45b42f21bc5a4e84b60981a3d629ab3')) paddle.fluid.layers.linspace (ArgSpec(args=['start', 'stop', 'num', 'dtype'], varargs=None, keywords=None, defaults=None), ('document', '3663d1148946eed4c1c34c81be586b9e')) paddle.fluid.layers.zeros_like (ArgSpec(args=['x', 'out'], varargs=None, keywords=None, defaults=(None,)), ('document', 'd88a23bcdc443719b3953593f7cef14a')) -paddle.fluid.layers.ones_like (ArgSpec(args=['x', 'out'], varargs=None, keywords=None, defaults=(None,)), ('document', '642afd126553337d6796600e886a6525')) +paddle.fluid.layers.ones_like (ArgSpec(args=['x', 'out'], varargs=None, keywords=None, defaults=(None,)), ('document', 'd18d42059c6b189cbd3fab2fcb206c15')) paddle.fluid.layers.diag (ArgSpec(args=['diagonal'], varargs=None, keywords=None, defaults=None), ('document', '88a15e15f0098d549f07a01eaebf9ce3')) paddle.fluid.layers.eye (ArgSpec(args=['num_rows', 'num_columns', 'batch_shape', 'dtype'], varargs=None, keywords=None, defaults=(None, None, 'float32')), ('document', '25389d1e239a5d1cda66298f908ec549')) paddle.fluid.layers.While ('paddle.fluid.layers.control_flow.While', ('document', '50110155608a00f43d3d3fd1be41dcb4')) diff --git a/python/paddle/fluid/layers/tensor.py b/python/paddle/fluid/layers/tensor.py index 24ad4a2b3f3..511f000d919 100644 --- a/python/paddle/fluid/layers/tensor.py +++ b/python/paddle/fluid/layers/tensor.py @@ -1074,7 +1074,7 @@ def ones_like(x, out=None): out(Variable): The output tensor. Returns: - x(Variable): The tensor variable storing the output. + out(Variable): The tensor variable storing the output. Examples: .. code-block:: python -- GitLab