From 891c116ea4e9228bdd9a3bc3262361cb462e1963 Mon Sep 17 00:00:00 2001 From: guosheng Date: Wed, 24 Oct 2018 10:07:48 +0800 Subject: [PATCH] Refine the doc of reshape_op --- python/paddle/fluid/layers/nn.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index fc116445bee..f0414b7836d 100644 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -4904,8 +4904,10 @@ def reshape(x, shape, actual_shape=None, act=None, inplace=False, name=None): name (str): The name of this layer. It is optional. Returns: - Variable: The reshaped tensor variable. It is a new tensor variable if \ - if :attr:`inplace` is :attr:`False`, otherwise it is :attr:`x`. + Variable: The reshaped tensor variable if :attr:`act` is None. It is a \ + new tensor variable if :attr:`inplace` is :attr:`False`, \ + otherwise it is :attr:`x`. If :attr:`act` is not None, return \ + the activated tensor variable. Raises: TypeError: if actual_shape is neither Variable nor None. -- GitLab