diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index fc116445beeb4f68fe78c6f4c76e0ef688808e24..f0414b7836d59a6c0aae1ff9ecd372a3f3501841 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.