Skip to content

Commit efa6f0d

Browse files
author
Yibing Liu
committed
Remove inplace args in unsqueeze & squeeze ops
1 parent 26710cc commit efa6f0d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

paddle/fluid/API.spec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ paddle.fluid.layers.smooth_l1 ArgSpec(args=['x', 'y', 'inside_weight', 'outside_
143143
paddle.fluid.layers.one_hot ArgSpec(args=['input', 'depth'], varargs=None, keywords=None, defaults=None)
144144
paddle.fluid.layers.autoincreased_step_counter ArgSpec(args=['counter_name', 'begin', 'step'], varargs=None, keywords=None, defaults=(None, 1, 1))
145145
paddle.fluid.layers.reshape ArgSpec(args=['x', 'shape', 'actual_shape', 'act', 'inplace', 'name'], varargs=None, keywords=None, defaults=(None, None, True, None))
146-
paddle.fluid.layers.squeeze ArgSpec(args=['input', 'axes', 'inplace', 'name'], varargs=None, keywords=None, defaults=(False, None))
147-
paddle.fluid.layers.unsqueeze ArgSpec(args=['input', 'axes', 'inplace', 'name'], varargs=None, keywords=None, defaults=(False, None))
146+
paddle.fluid.layers.squeeze ArgSpec(args=['input', 'axes', 'name'], varargs=None, keywords=None, defaults=(False, None))
147+
paddle.fluid.layers.unsqueeze ArgSpec(args=['input', 'axes', 'name'], varargs=None, keywords=None, defaults=(False, None))
148148
paddle.fluid.layers.lod_reset ArgSpec(args=['x', 'y', 'target_lod'], varargs=None, keywords=None, defaults=(None, None))
149149
paddle.fluid.layers.lrn ArgSpec(args=['input', 'n', 'k', 'alpha', 'beta', 'name'], varargs=None, keywords=None, defaults=(5, 1.0, 0.0001, 0.75, None))
150150
paddle.fluid.layers.pad ArgSpec(args=['x', 'paddings', 'pad_value', 'name'], varargs=None, keywords=None, defaults=(0.0, None))

python/paddle/fluid/layers/nn.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4486,7 +4486,7 @@ def reshape(x, shape, actual_shape=None, act=None, inplace=True, name=None):
44864486
return helper.append_activation(out)
44874487

44884488

4489-
def squeeze(input, axes, inplace=False, name=None):
4489+
def squeeze(input, axes, name=None):
44904490
"""
44914491
Remove single-dimensional entries from the shape of a tensor. Takes a
44924492
parameter axes with a list of axes to squeeze. If axes is not provided, all
@@ -4534,7 +4534,7 @@ def squeeze(input, axes, inplace=False, name=None):
45344534
return out
45354535

45364536

4537-
def unsqueeze(input, axes, inplace=False, name=None):
4537+
def unsqueeze(input, axes, name=None):
45384538
"""
45394539
Insert single-dimensional entries to the shape of a tensor. Takes one
45404540
required argument axes, a list of dimensions that will be inserted.

0 commit comments

Comments
 (0)