Skip to content

Commit 998e271

Browse files
committed
Refine the doc of reshape_op by following comments.
test=develop
1 parent 891c116 commit 998e271

File tree

1 file changed

+7
-7
lines changed
  • python/paddle/fluid/layers

1 file changed

+7
-7
lines changed

python/paddle/fluid/layers/nn.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4894,13 +4894,13 @@ def reshape(x, shape, actual_shape=None, act=None, inplace=False, name=None):
48944894
than :attr:`shape`.
48954895
act (str): The non-linear activation to be applied to the reshaped tensor
48964896
variable.
4897-
inplace(bool): If this flag is set true, reuse input :attr:`x` to reshape,
4898-
which will change the shape of tensor variable :attr:`x`.
4899-
Otherwise, preserve the shape :attr:`x` and create a new
4900-
output tensor variable whose data is copied from input x
4901-
but reshaped. Though setting to :attr:`True` will be more
4902-
efficient, :attr:`False` is suggested when :attr:`x` are
4903-
used in multiple operators.
4897+
inplace(bool): Must use :attr:`False` if :attr:`x` is used in multiple
4898+
operators. If this flag is set :attr:`True`, reuse input
4899+
:attr:`x` to reshape, which will change the shape of
4900+
tensor variable :attr:`x` and might cause errors when
4901+
:attr:`x` is used in multiple operators. If :attr:`False`,
4902+
preserve the shape :attr:`x` and create a new output tensor
4903+
variable whose data is copied from input x but reshaped.
49044904
name (str): The name of this layer. It is optional.
49054905
49064906
Returns:

0 commit comments

Comments
 (0)